]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/gover: fix ModIsPrerelease for toolchain versions
authorMichael Matloob <matloob@golang.org>
Tue, 29 Jul 2025 21:12:24 +0000 (17:12 -0400)
committerMichael Matloob <matloob@google.com>
Wed, 30 Jul 2025 20:18:24 +0000 (13:18 -0700)
commit69338a335ada5882b888fb7eabe0ad6f0e12c986
tree962b44a48f062ec95207d8936594ba26f190a54e
parentcedf63616a00c8a6a69f6bbe4bc93b6865cec842
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 #74786

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