...

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

Documentation: cmd/go/testdata/script

     1env 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.
     7go list -e -deps -f '{{.ImportPath}} {{.Dir}}' ./bytes
     8stdout ^std/bytes.*$PWD[/\\]bytes
     9stdout '^bytes/modified'
    10
    11-- go.mod --
    12module std
    13
    14go 1.12
    15-- bytes/bytes.go --
    16package bytes
    17
    18import _"bytes/modified"
    19-- bytes/modified/modified.go --
    20package modified

View as plain text