.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.1.0 / internal / lsp / testdata / godef / b / e.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.1.0/internal/lsp/testdata/godef/b/e.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.1.0/internal/lsp/testdata/godef/b/e.go
new file mode 100644 (file)
index 0000000..92037ed
--- /dev/null
@@ -0,0 +1,31 @@
+package b
+
+import (
+       "fmt"
+
+       "golang.org/x/tools/internal/lsp/godef/a"
+)
+
+func useThings() {
+       t := a.Thing{}      //@mark(bStructType, "ing")
+       fmt.Print(t.Member) //@mark(bMember, "ember")
+       fmt.Print(a.Other)  //@mark(bVar, "ther")
+       a.Things()          //@mark(bFunc, "ings")
+}
+
+/*@
+godef(bStructType, Thing)
+godef(bMember, Member)
+godef(bVar, Other)
+godef(bFunc, Things)
+*/
+
+func _() {
+       var x interface{}      //@mark(eInterface, "interface{}")
+       switch x := x.(type) { //@hover("x", eInterface)
+       case string: //@mark(eString, "string")
+               fmt.Println(x) //@hover("x", eString)
+       case int: //@mark(eInt, "int")
+               fmt.Println(x) //@hover("x", eInt)
+       }
+}