github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_list_std.txt (about) 1 env GO111MODULE=on 2 env GOPROXY=off 3 4 [!gc] skip 5 [short] skip 6 7 # Outside of GOROOT, our vendored packages should be reported as part of the standard library. 8 go list -f '{{if .Standard}}{{.ImportPath}}{{end}}' std cmd 9 stdout ^vendor/golang.org/x/net/http2/hpack 10 stdout ^cmd/vendor/golang\.org/x/arch/x86/x86asm 11 12 # cmd/... should match the same packages it used to match in GOPATH mode. 13 go list cmd/... 14 stdout ^cmd/compile 15 ! stdout ^cmd/vendor/golang\.org/x/arch/x86/x86asm 16 17 18 # Within the std module, listing ./... should omit the 'std' prefix: 19 # the package paths should be the same via ./... or the 'std' meta-pattern. 20 # TODO(golang.org/issue/30241): Make that work. 21 # Today, they are listed in 'std' but not './...'. 22 cd $GOROOT/src 23 go list ./... 24 ! stdout ^vendor/golang.org/x # TODO: should be included, or should be omitted from 'std'. 25 26 cp stdout $WORK/listdot.txt 27 go list std 28 stdout ^vendor/golang.org/x # TODO: remove vendor/ prefix 29 # TODO: cmp stdout $WORK/listdot.txt 30 31 go list all 32 stdout ^vendor/golang.org/x # TODO: remove vendor/ prefix. 33 ! stdout ^std/ 34 35 36 # Within the std module, the vendored dependencies of std should appear 37 # to come from the actual modules. 38 # TODO(golang.org/issue/30241): Make that work. 39 # Today, they still have the vendor/ prefix. 40 go list std 41 stdout ^vendor/golang.org/x/net/http2/hpack # TODO 42 ! stdout ^golang.org/x/net/http2/hpack # TODO 43 44 go list -deps -f '{{if not .Standard}}{{.ImportPath}}{{end}}' std 45 # ! stdout ^vendor/golang.org/x/net/http2/hpack # TODO 46 ! stdout ^golang.org/x/net/http2/hpack # TODO 47 48 49 # Within std, the vendored dependencies of cmd should still appear to be part of cmd. 50 go list -f '{{if .Standard}}{{.ImportPath}}{{end}}' cmd 51 stdout ^cmd/vendor/golang\.org/x/arch/x86/x86asm 52 53 go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' cmd 54 ! stdout . 55 56 go list cmd/... 57 stdout ^cmd/compile 58 ! stdout ^cmd/vendor/golang\.org/x/arch/x86/x86asm