Go version

go version go1.24.5 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE=''

What did you do?

$ date
Mar 29 jul 2025 08:10:11 CEST
$ go version
go version go1.24.5 darwin/arm64
$ cat go.mod
module x

go 1.23.0
$ go get toolchain@latest
go: added toolchain go1.25rc2
$ cat go.mod
module x

go 1.23.0

toolchain go1.25rc2
$ go list
go1.25rc2: not downloaded. Run 'go1.25rc2 download' to install to $HOME/sdk/go1.25rc2
$ go version
go1.25rc2: not downloaded. Run 'go1.25rc2 download' to install to $HOME/sdk/go1.25rc2
$ go get toolchain@1.23.0
go1.25rc2: not downloaded. Run 'go1.25rc2 download' to install to $HOME/sdk/go1.25rc2
$ # Let's fix
$ sed -i '' '/^toolchain/d' go.mod && go mod tidy
$ cat go.mod
module x

go 1.23.0
$ go version
go version go1.24.5 darwin/arm64

What did you see happen?

go1.25rc2 is the toolchain added in go.mod. But that toolchain is not fully functional like a stable release. As a result my project is broken. I don't even have a functional go command to revert the issue.

What did you expect to see?

go get toolchain@latest should get the latest stable release of the go toolchain, and ignore release candidates. Today (2025-07-29) it should have installed go1.24.5 instead of go1.25rc2.

Comment From: dolmen

Cc: @golang/command-line

Comment From: gabyhelp

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: mrkfrmn

CC @golang/command-line from owners.

Comment From: mrkfrmn

(Sorry for the double CC)

Comment From: gopherbot

Change https://go.dev/cl/691655 mentions this issue: cmd/go/internal/gover: fix ModIsPrerelease for toolchain versions