GoPLS Viewer

Home|gopls/cmd/guru/testdata/src/implements-methods-json/main.go
1package main
2
3// Tests of 'implements' query applied to methods, -output=json.
4// See go.tools/guru/guru_test.go for explanation.
5// See implements-methods.golden for expected query results.
6
7import _ "lib"
8
9func main() {
10}
11
12type F interface {
13    f() // @implements F.f "f"
14}
15
16type FG interface {
17    f()       // @implements FG.f "f"
18    g() []int // @implements FG.g "g"
19}
20
21type C int
22type D struct{}
23
24func (c *Cf() {} // @implements *C.f "f"
25func (d Df()  {} // @implements D.f "f"
26
27func (d *Dg() []int { return nil } // @implements *D.g "g"
28
29type sorter []int
30
31func (sorterLen() int           { return 0 } // @implements Len "Len"
32func (sorterLess(ij intbool { return false }
33func (sorterSwap(ij int)      {}
34
35type I interface {
36    Method(*int) *int // @implements I.Method "Method"
37}
38
MembersX
D.f
sorter.Less.j
D.g.d
sorter.Swap
I
_
FG
C.f.c
sorter.Len
sorter.Swap.i
D
C.f
D.f.d
D.g
sorter
main
F
C
sorter.Less
sorter.Less.i
sorter.Swap.j
Members
X