mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
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 <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
f85d0e32e5
commit
e5986209e0
@ -133,37 +133,6 @@ func main() {
|
|||||||
os.Exit(2)
|
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.
|
// Set environment (GOOS, GOARCH, etc) explicitly.
|
||||||
// In theory all the commands we invoke should have
|
// In theory all the commands we invoke should have
|
||||||
// the same default computation of these as we do,
|
// the same default computation of these as we do,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user