github.com/april1989/origin-go-tools@v0.0.32/cmd/guru/testdata/src/implements-json/main.go (about)

     1  package main
     2  
     3  // Tests of 'implements' query, -output=json.
     4  // See go.tools/guru/guru_test.go for explanation.
     5  // See implements.golden for expected query results.
     6  
     7  func main() {
     8  }
     9  
    10  type E interface{} // @implements E "E"
    11  
    12  type F interface { // @implements F "F"
    13  	f()
    14  }
    15  
    16  type FG interface { // @implements FG "FG"
    17  	f()
    18  	g() []int // @implements slice "..int"
    19  }
    20  
    21  type C int // @implements C "C"
    22  type D struct{}
    23  
    24  func (c *C) f() {} // @implements starC ".C"
    25  func (d D) f()  {} // @implements D "D"
    26  
    27  func (d *D) g() []int { return nil } // @implements starD ".D"