Commit 03eb137a authored by yuuji.yaginuma's avatar yuuji.yaginuma Committed by Emmanuel Odeke

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/144838Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent cb413099
......@@ -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":
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment