github.com/zxy12/go_duplicate_112_new@v0.0.0-20200807091221-747231827200/src/cmd/go/testdata/script/mod_init_dep.txt (about)

     1  env GO111MODULE=on
     2  
     3  # modconv uses git directly to examine what old 'go get' would
     4  [!net] skip
     5  [!exec:git] skip
     6  
     7  # go build should populate go.mod from Gopkg.lock
     8  cp go.mod1 go.mod
     9  go build
    10  stderr 'copying requirements from Gopkg.lock'
    11  go list -m all
    12  ! stderr 'copying requirements from Gopkg.lock'
    13  stdout 'rsc.io/sampler v1.0.0'
    14  
    15  # go list should populate go.mod from Gopkg.lock
    16  cp go.mod1 go.mod
    17  go list
    18  stderr 'copying requirements from Gopkg.lock'
    19  go list
    20  ! stderr 'copying requirements from Gopkg.lock'
    21  go list -m all
    22  stdout 'rsc.io/sampler v1.0.0'
    23  
    24  -- go.mod1 --
    25  module x
    26  
    27  -- x.go --
    28  package x
    29  
    30  -- Gopkg.lock --
    31  [[projects]]
    32    name = "rsc.io/sampler"
    33    version = "v1.0.0"
    34