1 # Issue #46092
2 # go list -find should always return a package with an empty Deps list
3
4 # The linker loads implicit dependencies
5 go list -find -f {{.Deps}} ./cmd
6 stdout '\[\]'
7
8 # Cgo translation may add imports of "unsafe", "runtime/cgo" and "syscall"
9 go list -find -f {{.Deps}} ./cgo
10 stdout '\[\]'
11
12 # SWIG adds imports of some standard packages
13 go list -find -f {{.Deps}} ./swig
14 stdout '\[\]'
15
16 -- go.mod --
17 module listfind
18
19 -- cmd/main.go --
20 package main
21
22 func main() {}
23
24 -- cgo/pkg.go --
25 package cgopkg
26
27 /*
28 #include <limits.h>
29 */
30 import "C"
31
32 func F() {
33 println(C.INT_MAX)
34 }
35
36 -- cgo/pkg_notcgo.go --
37 //go:build !cgo
38 // +build !cgo
39
40 package cgopkg
41
42 func F() {
43 println(0)
44 }
45
46 -- swig/pkg.go --
47 package swigpkg
48
49 -- swig/a.swigcxx --
50
View as plain text