From 3a37b112816d0002ed29804401560e0419b11a92 Mon Sep 17 00:00:00 2001 From: hopehook Date: Tue, 4 Oct 2022 10:30:55 +0800 Subject: [PATCH] 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 --- src/cmd/go/alldocs.go | 2 +- src/cmd/go/internal/vet/vet.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index f83a7e261b6..57d7c4ebf78 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 ee672d1a30d..e5f8af1c37d 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