...
1# Unknown lines should be ignored in dependency go.mod files.
2go list -m -mod=mod all
3
4# ... and in replaced dependency go.mod files.
5cp go.mod go.mod.usesub
6go list -m -mod=mod all
7
8# ... but not in the main module.
9cp go.mod.bad go.mod
10! go list -m -mod=mod all
11stderr 'unknown directive: hello'
12
13-- go.mod --
14module m
15require rsc.io/badmod v1.0.0
16-- go.mod.bad --
17module m
18hello world
19-- go.mod.usesub --
20module m
21require rsc.io/badmod v1.0.0
22replace rsc.io/badmod v1.0.0 => ./sub
23-- sub/go.mod --
24module sub
25hello world
View as plain text