summaryrefslogtreecommitdiff
path: root/libgo/go/cmd/go/testdata/script/mod_vendor_build.txt
blob: 7b304dbb707ea86cd98f463c4ab83444ae363822 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
env GO111MODULE=on

# initial conditions: using sampler v1.3.0, not listed in go.mod.
go list -deps
stdout rsc.io/sampler
! grep 'rsc.io/sampler v1.3.0' go.mod

# update to v1.3.1, now indirect in go.mod.
go get rsc.io/sampler@v1.3.1
grep 'rsc.io/sampler v1.3.1 // indirect' go.mod
cp go.mod go.mod.good

# vendoring can but should not need to make changes.
go mod vendor
cmp go.mod go.mod.good

# go list -mod=vendor (or go build -mod=vendor) must not modify go.mod.
# golang.org/issue/26704
go list -mod=vendor
cmp go.mod go.mod.good

-- go.mod --
module m

-- x.go --
package x
import _ "rsc.io/quote"