...

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

Documentation: cmd/go/testdata/script

     1# Test that go run does not get confused by conflict
     2# between go.mod's module path and what you'd
     3# expect from GOPATH. golang.org/issue/26046.
     4
     5env GO111MODULE=on
     6
     7cd $GOPATH/src/example.com/hello
     8go run main.go
     9
    10-- $GOPATH/src/example.com/hello/go.mod --
    11module example.com/hello/v2
    12
    13-- $GOPATH/src/example.com/hello/main.go --
    14package main
    15func main() {}

View as plain text