mirror of
https://github.com/golang/go
synced 2024-11-12 08:40:21 -07:00
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
This commit is contained in:
parent
51104cd4d2
commit
5ae1340954
@ -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":
|
||||
|
Loading…
Reference in New Issue
Block a user