Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.0.0-20201028153306-37f0764111ff / internal / lsp / testdata / godef / a / random.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201028153306-37f0764111ff/internal/lsp/testdata/godef/a/random.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.0.0-20201028153306-37f0764111ff/internal/lsp/testdata/godef/a/random.go
new file mode 100644 (file)
index 0000000..62055c1
--- /dev/null
@@ -0,0 +1,31 @@
+package a
+
+func Random() int { //@Random
+       y := 6 + 7
+       return y
+}
+
+func Random2(y int) int { //@Random2,mark(RandomParamY, "y")
+       return y //@godef("y", RandomParamY)
+}
+
+type Pos struct {
+       x, y int //@mark(PosX, "x"),mark(PosY, "y")
+}
+
+// Typ has a comment. Its fields do not.
+type Typ struct{ field string } //@mark(TypField, "field")
+
+func _() {
+       x := &Typ{}
+       x.field //@godef("field", TypField)
+}
+
+func (p *Pos) Sum() int { //@mark(PosSum, "Sum")
+       return p.x + p.y //@godef("x", PosX)
+}
+
+func _() {
+       var p Pos
+       _ = p.Sum() //@godef("()", PosSum)
+}