...

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

Documentation: cmd/go/testdata/script

     1env GO111MODULE=off
     2
     3[!compiler:gc] skip
     4[short] skip
     5
     6# Listing GOROOT should only find standard packages.
     7cd $GOROOT/src
     8go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' ./...
     9! stdout .
    10
    11# Standard packages should include cmd, but not cmd/vendor.
    12go list ./...
    13stdout cmd/compile
    14! stdout vendor/golang.org
    15! stdout cmd/vendor
    16
    17# In GOPATH mode, packages vendored into GOROOT should be reported as standard.
    18go list -f '{{if .Standard}}{{.ImportPath}}{{end}}' std cmd
    19stdout golang.org/x/net/http2/hpack
    20stdout cmd/vendor/golang\.org/x/arch/x86/x86asm
    21
    22# However, vendored packages should not match wildcard patterns beginning with cmd.
    23go list cmd/...
    24stdout cmd/compile
    25! stdout cmd/vendor

View as plain text