github.com/megatontech/mynoteforgo@v0.0.0-20200507084910-5d0c6ea6e890/源码/cmd/go/testdata/script/list_find.txt (about)

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