From ab5956909952aa625ab8d51086beca299477e7b0 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Fri, 14 Nov 2025 15:40:43 -0500 Subject: [PATCH] go/version: use "custom" as an example of a version suffix The suffix in a non-standard toolchain version can be any string. Show more of a middle ground example of a non-standard version suffix, aligning it with the example used at https://go.dev/doc/toolchain#name. For #75953. Change-Id: I98f9c4de98316aecf76c017eb13cf25582c8939c Reviewed-on: https://go-review.googlesource.com/c/go/+/720621 Reviewed-by: Quim Muntal LUCI-TryBot-Result: Go LUCI Auto-Submit: Dmitri Shuralyov Reviewed-by: Mark Freeman Reviewed-by: Dmitri Shuralyov --- src/go/version/version.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/go/version/version.go b/src/go/version/version.go index 6b8ee67442..cfd2e9ba36 100644 --- a/src/go/version/version.go +++ b/src/go/version/version.go @@ -4,7 +4,7 @@ // Package version provides operations on [Go versions] // in [Go toolchain name syntax]: strings like -// "go1.20", "go1.21.0", "go1.22rc2", and "go1.23.4-bigcorp". +// "go1.20", "go1.21.0", "go1.22rc2", and "go1.23.4-custom". // // [Go versions]: https://go.dev/doc/toolchain#version // [Go toolchain name syntax]: https://go.dev/doc/toolchain#name @@ -15,10 +15,10 @@ import ( "strings" ) -// stripGo converts from a "go1.21-bigcorp" version to a "1.21" version. +// stripGo converts from a "go1.21-custom" version to a "1.21" version. // If v does not start with "go", stripGo returns the empty string (a known invalid version). func stripGo(v string) string { - v, _, _ = strings.Cut(v, "-") // strip -bigcorp suffix. + v, _, _ = strings.Cut(v, "-") // strip -custom suffix. if len(v) < 2 || v[:2] != "go" { return "" } -- 2.52.0