summaryrefslogtreecommitdiff
path: root/libgo/go/cmd/go/testdata/script/mod_init_dep.txt
blob: 29c840b3833af5af4b42eea539daf6aee0e41ff3 (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
28
29
30
31
32
33
34
env GO111MODULE=on

# modconv uses git directly to examine what old 'go get' would
[!net] skip
[!exec:git] skip

# go build should populate go.mod from Gopkg.lock
cp go.mod1 go.mod
go build
stderr 'copying requirements from Gopkg.lock'
go list -m all
! stderr 'copying requirements from Gopkg.lock'
stdout 'rsc.io/sampler v1.0.0'

# go list should populate go.mod from Gopkg.lock
cp go.mod1 go.mod
go list
stderr 'copying requirements from Gopkg.lock'
go list
! stderr 'copying requirements from Gopkg.lock'
go list -m all
stdout 'rsc.io/sampler v1.0.0'

-- go.mod1 --
module x

-- x.go --
package x

-- Gopkg.lock --
[[projects]]
  name = "rsc.io/sampler"
  version = "v1.0.0"