kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/go/indexer/testdata/basic/packageinit.go (about) 1 // Package pkginit tests callgraph relationships for calls occurring in the 2 // package-level initializer. 3 package pkginit 4 5 import "fmt" 6 7 // Ensure that callsites at the package level are blamed on the implicit 8 // package initializer, and that said initializer is given a sensible 9 // definition anchor per http://www.kythe.io/docs/schema/callgraph.html 10 11 // - A=@"fmt.Sprint(27)" ref/call _FmtSprint 12 // - A childof PkgInit=vname("package.<init>@107", "test", _, "pkginit", "go") 13 // - PkgInit.node/kind function 14 // - 15 // - InitDef=vname(_, "test", "", "pkginit/packageinit.go", "go") 16 // - defines PkgInit 17 // - InitDef.node/kind anchor 18 // - InitDef.loc/start 0 19 // - InitDef.loc/end 0 20 var p = fmt.Sprint(27)