github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/tools/oracle/testdata/src/main/calls-json.go (about)

     1  package main
     2  
     3  // Tests of call-graph queries, -format=json.
     4  // See go.tools/oracle/oracle_test.go for explanation.
     5  // See calls-json.golden for expected query results.
     6  
     7  func call(f func()) {
     8  	f() // @callees @callees-f "f"
     9  }
    10  
    11  func main() {
    12  	call(func() {
    13  		// @callers callers-main.anon "^"
    14  		// @callstack callstack-main.anon "^"
    15  	})
    16  }