*get.CmdGet = *modget.CmdGet
}
+ if args[0] == "get" || args[0] == "help" {
+ // Replace get with module-aware get if appropriate.
+ // Note that if MustUseModules is true, this happened already above,
+ // but no harm in doing it again.
+ if modload.Init(); modload.Enabled() {
+ *get.CmdGet = *modget.CmdGet
+ }
+ }
+
cfg.CmdName = args[0] // for error messages
if args[0] == "help" {
help.Help(os.Stdout, args[1:])
os.Exit(2)
}
- if args[0] == "get" {
- // Replace get with module-aware get if appropriate.
- // Note that if MustUseModules is true, this happened already above,
- // but no harm in doing it again.
- if modload.Init(); modload.Enabled() {
- *get.CmdGet = *modget.CmdGet
- }
- }
-
// Set environment (GOOS, GOARCH, etc) explicitly.
// In theory all the commands we invoke should have
// the same default computation of these as we do,
! go vet -h
stderr 'usage: go vet'
stderr 'Run ''go help vet'' for details'
+
+# go help get shows usage for get
+go help get
+stdout 'usage: go get'
+stdout 'get when using GOPATH'
\ No newline at end of file