From b1247d2d0d51108c910a73891ff3116e5f032ab1 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Sat, 12 Jan 2019 18:39:45 +0100 Subject: [pkg] all your deps are vendored to us --- .../x/tools/go/callgraph/cha/testdata/func.go | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 vendor/golang.org/x/tools/go/callgraph/cha/testdata/func.go (limited to 'vendor/golang.org/x/tools/go/callgraph/cha/testdata/func.go') diff --git a/vendor/golang.org/x/tools/go/callgraph/cha/testdata/func.go b/vendor/golang.org/x/tools/go/callgraph/cha/testdata/func.go new file mode 100644 index 0000000..ad483f1 --- /dev/null +++ b/vendor/golang.org/x/tools/go/callgraph/cha/testdata/func.go @@ -0,0 +1,23 @@ +//+build ignore + +package main + +// Test of dynamic function calls; no interfaces. + +func A(int) {} + +var ( + B = func(int) {} + C = func(int) {} +) + +func f() { + pfn := B + pfn(0) // calls A, B, C, even though A is not even address-taken +} + +// WANT: +// Dynamic calls +// f --> A +// f --> init$1 +// f --> init$2 -- cgit v1.2.3