...

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

Documentation: cmd/go/testdata/script

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

View as plain text