]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: Remove old mod helper prints in Go 1.12.
authorBaokun Lee <nototon@gmail.com>
Tue, 29 Jan 2019 07:34:26 +0000 (15:34 +0800)
committerBryan C. Mills <bcmills@google.com>
Wed, 17 Apr 2019 17:58:26 +0000 (17:58 +0000)
Change-Id: I43d233739ce6a6fbc4ee281b569d6230dd552cb4
Reviewed-on: https://go-review.googlesource.com/c/go/+/160057
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/go/main.go

index e529e96986eb99408a76788b7dc3c1baf43d43de..35a507680f19086f7804cd3ac82dc982e16364b8 100644 (file)
@@ -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,