From: hopehook Date: Tue, 4 Oct 2022 02:30:55 +0000 (+0800) Subject: cmd/go: add @latest suffix for go install X-Git-Tag: go1.20rc1~728 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3a37b112816d0002ed29804401560e0419b11a92;p=gostls13.git cmd/go: add @latest suffix for go install Fixes #56014. Change-Id: I75a3960e092459531de43868750f1684ed2ccb70 Reviewed-on: https://go-review.googlesource.com/c/go/+/437998 Reviewed-by: Bryan Mills Run-TryBot: Bryan Mills Reviewed-by: Tim King Run-TryBot: hopehook TryBot-Result: Gopher Robot Auto-Submit: Bryan Mills --- diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index f83a7e261b..57d7c4ebf7 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -1814,7 +1814,7 @@ // or additional checks. // For example, the 'shadow' analyzer can be built and run using these commands: // -// go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow +// go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest // go vet -vettool=$(which shadow) // // The build flags supported by go vet are those that control package resolution diff --git a/src/cmd/go/internal/vet/vet.go b/src/cmd/go/internal/vet/vet.go index ee672d1a30..e5f8af1c37 100644 --- a/src/cmd/go/internal/vet/vet.go +++ b/src/cmd/go/internal/vet/vet.go @@ -42,7 +42,7 @@ The -vettool=prog flag selects a different analysis tool with alternative or additional checks. For example, the 'shadow' analyzer can be built and run using these commands: - go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow + go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest go vet -vettool=$(which shadow) The build flags supported by go vet are those that control package resolution