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

     1  # 'go list -mod=readonly -e should attribute errors
     2  # to individual missing packages.
     3  # Verifies golang.org/issue/34829.
     4  go list -mod=readonly -e -deps -f '{{if .Error}}{{.ImportPath}}: {{.Error}}{{end}}' .
     5  stdout 'example.com/missing: use.go:3:8: cannot find module providing package example.com/missing: import lookup disabled by -mod=readonly'
     6  
     7  -- go.mod --
     8  module example.com/m
     9  
    10  go 1.14
    11  
    12  -- use.go --
    13  package use
    14  
    15  import _ "example.com/missing"
    16  

View as plain text