Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for CreateModFile (0.1 sec)

  1. src/cmd/go/internal/modcmd/init.go

    	if len(args) > 1 {
    		base.Fatalf("go: 'go mod init' accepts at most one argument")
    	}
    	var modPath string
    	if len(args) == 1 {
    		modPath = args[0]
    	}
    
    	modload.ForceUseModules = true
    	modload.CreateModFile(ctx, modPath) // does all the hard work
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 19 15:51:46 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  2. src/cmd/go/internal/modload/init.go

    		base.ShortPath(filepath.Dir(gomod)), goVers, verb, gover.FromGoWork(wf))
    }
    
    // CreateModFile initializes a new module by creating a go.mod file.
    //
    // If modPath is empty, CreateModFile will attempt to infer the path from the
    // directory location within GOPATH.
    //
    // If a vendoring configuration file is present, CreateModFile will attempt to
    // translate it to go.mod directives. The resulting build list may not be
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 18:36:30 UTC 2024
    - 69.8K bytes
    - Viewed (0)
Back to top