Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for AddChdirFlag (0.15 sec)

  1. src/cmd/go/chdir_test.go

    			}
    			return
    		}
    		f := cmd.Flag.Lookup("C")
    		if f == nil {
    			t.Errorf("%s has no -C flag", name)
    		} else if f.Usage != "AddChdirFlag" {
    			t.Errorf("%s has -C flag but not from AddChdirFlag", name)
    		}
    	}
    	walk("go", base.Go)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 03 12:16:35 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  2. src/cmd/go/internal/base/flag.go

    	flags.BoolVar(&cfg.BuildN, "n", false, "")
    	flags.BoolVar(&cfg.BuildX, "x", false, "")
    }
    
    // AddChdirFlag adds the -C flag to the flag set.
    func AddChdirFlag(flags *flag.FlagSet) {
    	// The usage message is never printed, but it's used in chdir_test.go
    	// to identify that the -C flag is from AddChdirFlag.
    	flags.Func("C", "AddChdirFlag", ChdirFlag)
    }
    
    // AddModFlag adds the -mod build flag to the flag set.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 19:23:42 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. src/cmd/go/internal/modcmd/init.go

    Gopkg.lock), and the current directory (if in GOPATH).
    
    See https://golang.org/ref/mod#go-mod-init for more about 'go mod init'.
    `,
    	Run: runInit,
    }
    
    func init() {
    	base.AddChdirFlag(&cmdInit.Flag)
    	base.AddModCommonFlags(&cmdInit.Flag)
    }
    
    func runInit(ctx context.Context, cmd *base.Command, args []string) {
    	if len(args) > 1 {
    		base.Fatalf("go: 'go mod init' accepts at most one argument")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 19 15:51:46 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  4. src/cmd/go/internal/workcmd/init.go

    current go version will also be listed in the go.work file.
    
    See the workspaces reference at https://go.dev/ref/mod#workspaces
    for more information.
    `,
    	Run: runInit,
    }
    
    func init() {
    	base.AddChdirFlag(&cmdInit.Flag)
    	base.AddModCommonFlags(&cmdInit.Flag)
    }
    
    func runInit(ctx context.Context, cmd *base.Command, args []string) {
    	modload.InitWorkfile()
    
    	modload.ForceUseModules = true
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jun 03 21:13:11 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  5. src/cmd/go/internal/workcmd/vendor.go

    func init() {
    	cmdVendor.Flag.BoolVar(&cfg.BuildV, "v", false, "")
    	cmdVendor.Flag.BoolVar(&vendorE, "e", false, "")
    	cmdVendor.Flag.StringVar(&vendorO, "o", "", "")
    	base.AddChdirFlag(&cmdVendor.Flag)
    	base.AddModCommonFlags(&cmdVendor.Flag)
    }
    
    func runVendor(ctx context.Context, cmd *base.Command, args []string) {
    	modload.InitWorkfile()
    	if modload.WorkFilePath() == "" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 24 18:09:22 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  6. src/cmd/go/internal/fmtcmd/fmt.go

    	"path/filepath"
    
    	"cmd/go/internal/base"
    	"cmd/go/internal/cfg"
    	"cmd/go/internal/load"
    	"cmd/go/internal/modload"
    	"cmd/internal/sys"
    )
    
    func init() {
    	base.AddBuildFlagsNX(&CmdFmt.Flag)
    	base.AddChdirFlag(&CmdFmt.Flag)
    	base.AddModFlag(&CmdFmt.Flag)
    	base.AddModCommonFlags(&CmdFmt.Flag)
    }
    
    var CmdFmt = &base.Command{
    	Run:       runFmt,
    	UsageLine: "go fmt [-n] [-x] [packages]",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 03 12:16:35 UTC 2022
    - 3K bytes
    - Viewed (0)
  7. src/cmd/go/internal/modcmd/graph.go

    	`,
    	Run: runGraph,
    }
    
    var (
    	graphGo goVersionFlag
    )
    
    func init() {
    	cmdGraph.Flag.Var(&graphGo, "go", "")
    	cmdGraph.Flag.BoolVar(&cfg.BuildX, "x", false, "")
    	base.AddChdirFlag(&cmdGraph.Flag)
    	base.AddModCommonFlags(&cmdGraph.Flag)
    }
    
    func runGraph(ctx context.Context, cmd *base.Command, args []string) {
    	modload.InitWorkfile()
    
    	if len(args) > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jun 03 21:13:11 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  8. src/cmd/go/internal/modcmd/verify.go

    modules have been changed and causes 'go mod' to exit with a
    non-zero status.
    
    See https://golang.org/ref/mod#go-mod-verify for more about 'go mod verify'.
    	`,
    	Run: runVerify,
    }
    
    func init() {
    	base.AddChdirFlag(&cmdVerify.Flag)
    	base.AddModCommonFlags(&cmdVerify.Flag)
    }
    
    func runVerify(ctx context.Context, cmd *base.Command, args []string) {
    	modload.InitWorkfile()
    
    	if len(args) != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 16:56:35 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  9. src/cmd/go/internal/telemetrycmd/telemetry.go

    To disable both collection and uploading, run "go telemetry off".
    
    See https://go.dev/doc/telemetry for more information on telemetry.
    `,
    	Run: runTelemetry,
    }
    
    func init() {
    	base.AddChdirFlag(&CmdTelemetry.Flag)
    }
    
    func runTelemetry(ctx context.Context, cmd *base.Command, args []string) {
    	if len(args) == 0 {
    		fmt.Println(telemetry.Mode())
    		return
    	}
    
    	if len(args) != 1 {
    		cmd.Usage()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 20:16:39 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  10. src/cmd/go/internal/version/version.go

    information consists of multiple lines following the version line, each
    indented by a leading tab character.
    
    See also: go doc runtime/debug.BuildInfo.
    `,
    }
    
    func init() {
    	base.AddChdirFlag(&CmdVersion.Flag)
    	CmdVersion.Run = runVersion // break init cycle
    }
    
    var (
    	versionM = CmdVersion.Flag.Bool("m", false, "")
    	versionV = CmdVersion.Flag.Bool("v", false, "")
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 19:27:00 UTC 2023
    - 4.8K bytes
    - Viewed (0)
Back to top