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

     1  # Issue 46119
     2  
     3  # When a module is inside a GOPATH workspace, Package.Root should be set to
     4  # Module.Dir instead of $GOPATH/src.
     5  
     6  env GOPATH=$WORK/tmp
     7  cd $WORK/tmp/src/test
     8  
     9  go list -f {{.Root}}
    10  stdout ^$PWD$
    11  
    12  # Were we really inside a GOPATH workspace?
    13  env GO111MODULE=off
    14  go list -f {{.Root}}
    15  stdout ^$WORK/tmp$
    16  
    17  -- $WORK/tmp/src/test/go.mod --
    18  module test
    19  
    20  -- $WORK/tmp/src/test/main.go --
    21  package main
    22  
    23  func main() {}
    24  

View as plain text