]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.24] cmd/go/internal/gover: fix ModIsPrerelease for toolchain...
authorMichael Matloob <matloob@golang.org>
Tue, 29 Jul 2025 21:12:24 +0000 (17:12 -0400)
committerCarlos Amedee <carlos@golang.org>
Wed, 20 Aug 2025 19:48:03 +0000 (12:48 -0700)
commitfe83d4bcad745b5173185025bb88ac78dd980dc3
tree26bc79dac134167d0145f5bd7d7a04c32b5f1dd0
parent7f36edc26d4e3becb6d9c9008ff00f260bb19055
[release-branch.go1.24] cmd/go/internal/gover: fix ModIsPrerelease for toolchain versions

We forgot to call the IsPrerelease function on FromToolchain(vers)
rather than on vers itself. IsPrerelase expects a version without the
"go" prefix. See the corresponding code in ModIsValid and ModIsPrefix
that call FromToolchain before passing the versions to IsValid and
IsLang respectively.

Fixes #74821

Change-Id: I3cf055e1348e6a9dc0334e414f06fe85eaf78024
Reviewed-on: https://go-review.googlesource.com/c/go/+/691655
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
(cherry picked from commit 69338a335ada5882b888fb7eabe0ad6f0e12c986)
Reviewed-on: https://go-review.googlesource.com/c/go/+/691957
src/cmd/go/internal/gover/mod.go
src/cmd/go/testdata/script/mod_get_toolchain.txt