]> Cypherpunks repositories - gostls13.git/commit
cmd/go: set GoVersion for files on the command line with vet
authorSam Thanawalla <samthanawalla@google.com>
Mon, 17 Jun 2024 19:19:56 +0000 (19:19 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 17 Jun 2024 21:04:41 +0000 (21:04 +0000)
commit144c96fac3ed1a5d4329238af1b98d3c09a6c438
treece4e6afc5226b1706645b3452e2c1398ef9e615d
parent22cf1e7f7eefb6c53249ea4f92e37197b0c8ce02
cmd/go: set GoVersion for files on the command line with vet

For: #65612
Fixes: #66092
For now, we will align the behavior such that vet and the compiler agree
that gover.Local() will be used for command-line-files.

We expect to change this to set the goversion as the containing module's go
version.

Change-Id: If7f2ea3a82e8e876716f18dacc021026de175a93
Reviewed-on: https://go-review.googlesource.com/c/go/+/593156
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Sam Thanawalla <samthanawalla@google.com>
src/cmd/go/internal/work/exec.go
src/cmd/go/internal/work/gc.go
src/cmd/go/testdata/script/run_vers.txt [new file with mode: 0644]
src/cmd/go/testdata/script/vet_commandline.txt [new file with mode: 0644]