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