cmd/go: reject to download toolchain when gotoolchain < go directive #72003
Labels
FixPending
Issues that have a fix which has not yet been reviewed or submitted.
GoCommand
cmd/go
ToolProposal
Issues describing a requested change to a Go tool or command-line program.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Both case 1 and case 2 should be rejected, because
go.mod
reference said.Hence, before we actually downloading toolchain, we should check the version inside
go.mod
and report an error.For example,
go: suggested go toolchain go1.23.0 cannot be less than required go version 1.24
Besides, the case2 looks weird in real usage.
What did you see instead?
The text was updated successfully, but these errors were encountered: