From e5986209e082cd207989d7f8759ba92e3f9dd8cb Mon Sep 17 00:00:00 2001 From: Baokun Lee Date: Tue, 29 Jan 2019 15:34:26 +0800 Subject: [PATCH] cmd/go: Remove old mod helper prints in Go 1.12. Change-Id: I43d233739ce6a6fbc4ee281b569d6230dd552cb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/160057 Reviewed-by: Bryan C. Mills Run-TryBot: Bryan C. Mills TryBot-Result: Gobot Gobot --- src/cmd/go/main.go | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/cmd/go/main.go b/src/cmd/go/main.go index e529e96986..35a507680f 100644 --- a/src/cmd/go/main.go +++ b/src/cmd/go/main.go @@ -133,37 +133,6 @@ func main() { os.Exit(2) } - // TODO(rsc): Remove all these helper prints in Go 1.12. - switch args[0] { - case "mod": - if len(args) >= 2 { - flag := args[1] - if strings.HasPrefix(flag, "--") { - flag = flag[1:] - } - if i := strings.Index(flag, "="); i >= 0 { - flag = flag[:i] - } - switch flag { - case "-sync", "-fix": - fmt.Fprintf(os.Stderr, "go: go mod %s is now go mod tidy\n", flag) - os.Exit(2) - case "-init", "-graph", "-vendor", "-verify": - fmt.Fprintf(os.Stderr, "go: go mod %s is now go mod %s\n", flag, flag[1:]) - os.Exit(2) - case "-fmt", "-json", "-module", "-require", "-droprequire", "-replace", "-dropreplace", "-exclude", "-dropexclude": - fmt.Fprintf(os.Stderr, "go: go mod %s is now go mod edit %s\n", flag, flag) - os.Exit(2) - } - } - case "vendor": - fmt.Fprintf(os.Stderr, "go: vgo vendor is now go mod vendor\n") - os.Exit(2) - case "verify": - fmt.Fprintf(os.Stderr, "go: vgo verify is now go mod verify\n") - os.Exit(2) - } - // Set environment (GOOS, GOARCH, etc) explicitly. // In theory all the commands we invoke should have // the same default computation of these as we do,