github.com/april1989/origin-go-tools@v0.0.32/cmd/guru/testdata/src/calls-json/main.go (about)

     1  package main
     2  
     3  // Tests of call-graph queries, -format=json.
     4  // See go.tools/guru/guru_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  }