]> Cypherpunks repositories - gostls13.git/commit
cmd/go: avoid matching wildcards rooted outside of available modules
authorBryan C. Mills <bcmills@google.com>
Fri, 28 Feb 2020 20:03:54 +0000 (15:03 -0500)
committerBryan C. Mills <bcmills@google.com>
Fri, 28 Feb 2020 21:56:35 +0000 (21:56 +0000)
commit618126b9895db7f29a861caa4e330d149858ff56
tree14b22fa6de658827549b6c2e8d6f17bf2d102207
parent964fac3ee74fe4df5423dad18f78322d88aae84a
cmd/go: avoid matching wildcards rooted outside of available modules

To avoid confusion, also distinguish between packages and dirs in
search.Match results.

No test because this is technically only a performance optimization:
it would be very difficult to write such a test so that it would not
be flaky. (However, tested the change manually.)

Fixes #37521

Change-Id: I17b443699ce6a8f3a63805a7ef0be806f695a4b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/221544
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/get/get.go
src/cmd/go/internal/modload/load.go
src/cmd/go/internal/search/search.go
src/cmd/go/testdata/script/mod_list_std.txt