Text file src/cmd/go/testdata/script/mod_get_sum_noroot.txt

     1  # When 'go get' is invoked on a module without a package in the root directory,
     2  # it should add sums for the module's go.mod file and its content to go.sum.
     3  # Verifies golang.org/issue/41103.
     4  go mod init m
     5  go get rsc.io/QUOTE
     6  grep '^rsc.io/QUOTE v1.5.2/go.mod ' go.sum
     7  grep '^rsc.io/QUOTE v1.5.2 ' go.sum
     8  
     9  # Double-check rsc.io/QUOTE does not have a root package.
    10  ! go list -mod=readonly rsc.io/QUOTE
    11  stderr '^cannot find module providing package rsc.io/QUOTE: import lookup disabled by -mod=readonly$'
    12  

View as plain text