From: yuuji.yaginuma Date: Thu, 15 Nov 2018 23:24:51 +0000 (+0000) Subject: cmd/go: correctly suggest tidy instead of nonexistent fix for -fix X-Git-Tag: go1.12beta1~340 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=03eb137aa311e6a5fe43f75c9f0178d042b560d9;p=gostls13.git cmd/go: correctly suggest tidy instead of nonexistent fix for -fix CL 129682 removed go mod fix but unfortunately we hadn't updated the source code hence running go mod -fix would suggest go mod fix which is a nonexistent command. This change fixes that to instead suggest go mod tidy Change-Id: Ie0d7c90805034e9fe6df24afaa15340c44d4f426 GitHub-Last-Rev: 5ae1340954c5f6b8535f837755a7bd79ebc7109d GitHub-Pull-Request: golang/go#28402 Reviewed-on: https://go-review.googlesource.com/c/144838 Reviewed-by: Emmanuel Odeke Run-TryBot: Emmanuel Odeke TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/go/main.go b/src/cmd/go/main.go index 6a188262cc..4f8ab7f55a 100644 --- a/src/cmd/go/main.go +++ b/src/cmd/go/main.go @@ -151,10 +151,10 @@ func main() { flag = flag[:i] } switch flag { - case "-sync": - fmt.Fprintf(os.Stderr, "go: go mod -sync is now go mod tidy\n") + case "-sync", "-fix": + fmt.Fprintf(os.Stderr, "go: go mod %s is now go mod tidy\n", flag) os.Exit(2) - case "-init", "-fix", "-graph", "-vendor", "-verify": + 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":