aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/modcmd/why.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2020-03-13 16:32:37 -0400
committerBryan C. Mills <bcmills@google.com>2020-09-09 22:37:22 +0000
commitd27ebc7b8630993269c36e7728a7f30543ffa048 (patch)
tree9d572666faf47590b1d7125b143b0186d12ef4e5 /src/cmd/go/internal/modcmd/why.go
parentb4944ef310ed43fad53c6128344e4bed2b346c88 (diff)
downloadgo-d27ebc7b8630993269c36e7728a7f30543ffa048.tar.gz
go-d27ebc7b8630993269c36e7728a7f30543ffa048.zip
cmd/go/internal/modload: implement the "all" pattern for lazy loading
The new semantics of the "all" package pattern can be implemented without actually changing module loading per se. This change implements those semantics, so that the change can be decoupled from the changes to the module requirement graph. For #36460 Change-Id: I0ee8b17afa8b728dc470a42a540fcc01764a4442 Reviewed-on: https://go-review.googlesource.com/c/go/+/240623 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>
Diffstat (limited to 'src/cmd/go/internal/modcmd/why.go')
-rw-r--r--src/cmd/go/internal/modcmd/why.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/go/internal/modcmd/why.go b/src/cmd/go/internal/modcmd/why.go
index b16887d318..30b15fc153 100644
--- a/src/cmd/go/internal/modcmd/why.go
+++ b/src/cmd/go/internal/modcmd/why.go
@@ -65,6 +65,8 @@ func runWhy(ctx context.Context, cmd *base.Command, args []string) {
loadALL := modload.LoadALL
if *whyVendor {
loadALL = modload.LoadVendor
+ } else {
+ modload.LoadTests = true
}
if *whyM {
listU := false