github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/tools/oracle/testdata/src/imports/main.go (about) 1 package main 2 3 import ( 4 "hash/fnv" // @describe ref-pkg-import2 "fnv" 5 "lib" // @describe ref-pkg-import "lib" 6 ) 7 8 // Tests that import another package. (To make the tests run quickly, 9 // we avoid using imports in all the other tests. Remember, each 10 // query causes parsing and typechecking of the whole program.) 11 // 12 // See go.tools/oracle/oracle_test.go for explanation. 13 // See imports.golden for expected query results. 14 15 var a int 16 17 func main() { 18 const c = lib.Const // @describe ref-const "Const" 19 lib.Func() // @describe ref-func "Func" 20 lib.Var++ // @describe ref-var "Var" 21 var t lib.Type // @describe ref-type "Type" 22 p := t.Method(&a) // @describe ref-method "Method" 23 24 print(*p + 1) // @pointsto p "p " 25 26 var _ lib.Type // @describe ref-pkg "lib" 27 28 fnv.New32() 29 }