]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.25] 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:47:59 +0000 (12:47 -0700)
commitc72fcab6d60d4907984a619d5d69bb9e7e18077a
tree5744aebe5d117953ba6417c2de4754162fad2da4
parent6e676ab2b809d46623acb5988248d95d1eb7939c
[release-branch.go1.25] 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 #74822

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/+/691958
src/cmd/go/internal/gover/mod.go
src/cmd/go/testdata/script/mod_get_toolchain.txt