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

     1  env GO111MODULE=on
     2  
     3  # If the working directory is a different GOROOT, then the 'std' module should be
     4  # treated as an ordinary module (with an ordinary module prefix).
     5  # It should not override packages in GOROOT, but should not fail the command.
     6  # See golang.org/issue/30756.
     7  go list -e -deps -f '{{.ImportPath}} {{.Dir}}' ./bytes
     8  stdout ^std/bytes.*$PWD[/\\]bytes
     9  stdout '^bytes/modified'
    10  
    11  -- go.mod --
    12  module std
    13  
    14  go 1.12
    15  -- bytes/bytes.go --
    16  package bytes
    17  
    18  import _"bytes/modified"
    19  -- bytes/modified/modified.go --
    20  package modified
    21  

View as plain text