aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/list/list.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2018-08-07 15:50:24 -0400
committerRuss Cox <rsc@golang.org>2018-08-10 00:47:06 +0000
commita4749604dc6cfea517ce2590336596a4ae570e78 (patch)
treea3e08f33970922cf43055d9af2a835bc3f0542b6 /src/cmd/go/internal/list/list.go
parentd611e95cabbd531418beb7c1fdc7191ba3151c2a (diff)
downloadgo-a4749604dc6cfea517ce2590336596a4ae570e78.tar.gz
go-a4749604dc6cfea517ce2590336596a4ae570e78.zip
cmd/go: fix module loader and test-only dependencies
go list all was not behaving as documented - it did not pick up test dependencies except when running in "go test" and "go vet". It should pick them up always. Also the module loader was ignoring tests when using "go list -test", which led to load failures. Fixing all required adjustments to mod_patterns test. Removed error-prone exact listings. Fixes #26279. Fixes #26906. Change-Id: I9c5acaf2275be20fd2349859589502190d3e7a78 Reviewed-on: https://go-review.googlesource.com/128358 Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/internal/list/list.go')
-rw-r--r--src/cmd/go/internal/list/list.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/go/internal/list/list.go b/src/cmd/go/internal/list/list.go
index 524ab99812..dd9ec5a9e5 100644
--- a/src/cmd/go/internal/list/list.go
+++ b/src/cmd/go/internal/list/list.go
@@ -303,6 +303,7 @@ var (
var nl = []byte{'\n'}
func runList(cmd *base.Command, args []string) {
+ modload.LoadTests = *listTest
work.BuildInit()
out := newTrackingWriter(os.Stdout)
defer out.w.Flush()