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

     1  env GO111MODULE=off
     2  
     3  # go list -find should not report imports
     4  
     5  go list -f {{.Incomplete}} x/y/z...  # should probably exit non-zero but never has
     6  stdout true
     7  go list -find -f '{{.Incomplete}} {{.Imports}}' x/y/z...
     8  stdout '^false \[\]'
     9  
    10  # go list -find -compiled should use cached sources the second time it's run.
    11  # It might not find the same cached sources as "go build", but the sources
    12  # should be identical. "go build" derives action IDs (which are used as cache
    13  # keys) from dependencies' action IDs. "go list -find" won't know what the
    14  # dependencies are, so it's can't construct the same action IDs.
    15  [short] skip
    16  go list -find -compiled net
    17  go list -find -compiled -x net
    18  ! stderr 'cgo'
    19  
    20  -- x/y/z/z.go --
    21  package z
    22  import "does/not/exist"
    23  

View as plain text