]> Cypherpunks repositories - gostls13.git/commit
cmd/go: accept non-standard versions like go1.21-20230523-foo in latest
authorRuss Cox <rsc@golang.org>
Tue, 23 May 2023 15:00:37 +0000 (11:00 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 23 May 2023 16:31:31 +0000 (16:31 +0000)
commiteb9a157d0f6c71877ff6473072d7a8f1c34f4afc
treedff8d55c0c96b86b229364eb3e1f4965d238faf9
parent6c024a4cf13f66b9a65616491340b33e0f7b099d
cmd/go: accept non-standard versions like go1.21-20230523-foo in latest

Some custom toolchain builds add extra suffixes to the version.
Strip those off (cutting at - or +) to find the underlying Go version.

For #57001.

Change-Id: I234fb2d069aaf0922c0a2c848e4a4c38e4adf9bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/497415
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
src/cmd/go/internal/gover/latest.go
src/cmd/go/testdata/script/gotoolchain.txt