github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/go/internal/base/flag.go (about)

     1  // Copyright 2017 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package base
     6  
     7  import (
     8  	"github.com/shogo82148/std/flag"
     9  )
    10  
    11  // A StringsFlag is a command-line flag that interprets its argument
    12  // as a space-separated list of possibly-quoted strings.
    13  type StringsFlag []string
    14  
    15  func (v *StringsFlag) Set(s string) error
    16  
    17  func (v *StringsFlag) String() string
    18  
    19  // AddBuildFlagsNX adds the -n and -x build flags to the flag set.
    20  func AddBuildFlagsNX(flags *flag.FlagSet)
    21  
    22  // AddChdirFlag adds the -C flag to the flag set.
    23  func AddChdirFlag(flags *flag.FlagSet)
    24  
    25  // AddModFlag adds the -mod build flag to the flag set.
    26  func AddModFlag(flags *flag.FlagSet)
    27  
    28  // AddModCommonFlags adds the module-related flags common to build commands
    29  // and 'go mod' subcommands.
    30  func AddModCommonFlags(flags *flag.FlagSet)
    31  
    32  func ChdirFlag(s string) error