]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: add a "v" prefix to the indexed go version
authorBryan C. Mills <bcmills@google.com>
Fri, 13 Mar 2020 20:46:51 +0000 (16:46 -0400)
committerBryan C. Mills <bcmills@google.com>
Mon, 24 Aug 2020 20:22:16 +0000 (20:22 +0000)
commit5c76382762cfc34b7a7678668460f127fec4a35b
tree1b87d124fa5d56eca5ea599bdfbd3346eedf6840
parent94953d3e5928c8a577bad7911aabbf627269ef77
cmd/go/internal/modload: add a "v" prefix to the indexed go version

This allows semver-based comparisons of the version without additional allocations.

Also comment on the reason for the loops that iterate over modFile instead.

(I was reading the vendor code in order to add the lazy-loading version check,
and this section was a bit unclear to me.)

For #36460

Change-Id: I11559d81ffb4eba0e4e10e6fa3c01990b11f9180
Reviewed-on: https://go-review.googlesource.com/c/go/+/240622
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/modload/modfile.go
src/cmd/go/internal/modload/vendor.go