.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.1.0 / go / pointer / testdata / hello.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.1.0/go/pointer/testdata/hello.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.1.0/go/pointer/testdata/hello.go
new file mode 100644 (file)
index 0000000..b81784b
--- /dev/null
@@ -0,0 +1,27 @@
+// +build ignore
+
+package main
+
+import (
+       "fmt"
+       "os"
+)
+
+type S int
+
+var theS S
+
+func (s *S) String() string {
+       print(s) // @pointsto main.theS
+       return ""
+}
+
+func main() {
+       // os.Args is considered intrinsically allocated,
+       // but may also be set explicitly (e.g. on Windows), hence '...'.
+       print(os.Args) // @pointsto <command-line args> | ...
+       fmt.Println("Hello, World!", &theS)
+}
+
+// @calls main.main               -> fmt.Println
+// @calls (*fmt.pp).handleMethods -> (*main.S).String