Skip to content

cmd/go: improve "toolchain not available" message when patch version is missing #66175

@adonovan

Description

@adonovan
xtools$ GOTOOLCHAIN=go1.22 go run hello.go
go: downloading go1.22 (darwin/arm64)
go: download go1.22 for darwin/arm64: toolchain not available
xtools$ GOTOOLCHAIN=go1.22.0 go run hello.go
Hello, world.

It took me a long while to figure out that the cause of the problem was a missing patch version suffix (.0). Either the go command should pick a reasonable suffix itself, or it should report that I am expected to provide one.

Metadata

Metadata

Assignees

Labels

BadErrorMessageIssues related compiler error messages that should be better.FixPendingIssues that have a fix which has not yet been reviewed or submitted.GoCommandcmd/go

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions