]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: avoid a network fetch when querying a valid semantic version
authorBryan C. Mills <bcmills@google.com>
Tue, 15 Sep 2020 19:14:55 +0000 (15:14 -0400)
committerBryan C. Mills <bcmills@google.com>
Thu, 17 Sep 2020 21:05:27 +0000 (21:05 +0000)
commit7a095c32366593f637a95bc927c63454125e3015
tree1a71ee0f17ad4b236307e8d4c6c0b7e1bd383d5d
parent9a702fd427645e4bcd42a68f9676bc1ab2adb6e4
cmd/go/internal/modload: avoid a network fetch when querying a valid semantic version

Test this behavior incidentally in a test for ambiguous import errors.
(I rediscovered the error when writing the new test.)

For #32567
Updates #28806

Change-Id: I323f05145734e5cf99818b9f04d65075f7c0f787
Reviewed-on: https://go-review.googlesource.com/c/go/+/255046
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/modload/query.go
src/cmd/go/testdata/script/mod_get_ambiguous_import.txt [new file with mode: 0644]