github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/list_compiled_imports.txt (about) 1 env GO111MODULE=off 2 3 [!cgo] skip 4 5 # go list should report import "C" 6 cd x 7 go list -f '{{.Imports}}' 8 ! stdout runtime/cgo 9 ! stdout unsafe 10 ! stdout syscall 11 stdout C 12 stdout unicode 13 stdout unicode/utf16 14 15 # go list -compiled should report imports in compiled files as well, 16 # adding "runtime/cgo", "unsafe", and "syscall" but not dropping "C". 17 go list -compiled -f '{{.Imports}}' 18 stdout runtime/cgo 19 stdout unsafe 20 stdout syscall 21 stdout C 22 stdout unicode 23 stdout unicode/utf16 24 25 -- x/x.go -- 26 package x 27 import "C" 28 import "unicode" // does not use unsafe, syscall, runtime/cgo, unicode/utf16 29 -- x/x1.go -- 30 package x 31 import "unicode/utf16" // does not use unsafe, syscall, runtime/cgo, unicode