You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This ignores whether or not the file has a containing module.
e.g. current go version running is 1.23
-> main.go
-> go.mod (1.21)
$ go vet -x main.go
will set the Go Version to be 1.23
New behavior
As discussed offline and in https://go-review.googlesource.com/c/go/+/567435 we have come to the decision to set the Go version to use the containing go.mod's version.
In the above example, $ go vet -x main.go
will set the Go Version to be 1.21
The text was updated successfully, but these errors were encountered:
Current behavior
The Go version for a file passed in via command-line uses the local version.
e.g.
$ go vet -x main.go
will set the Go Version to be the local version.
This happens in 3 places (maybe more):
This ignores whether or not the file has a containing module.
e.g. current go version running is 1.23
-> main.go
-> go.mod (1.21)
$ go vet -x main.go
will set the Go Version to be 1.23
New behavior
As discussed offline and in https://go-review.googlesource.com/c/go/+/567435 we have come to the decision to set the Go version to use the containing go.mod's version.
In the above example,
$ go vet -x main.go
will set the Go Version to be 1.21
The text was updated successfully, but these errors were encountered: