github.com/mvdan/interfacer@v0.0.0-20180901003855-c20040233aed/check/testdata/files/repeated_types.go (about) 1 package foo 2 3 type Namer interface { 4 Name() string 5 } 6 7 type st struct{} 8 9 func (s st) Name() string { 10 return "" 11 } 12 13 type MyPathFunc func(path string, s st) error 14 type MyPathFunc2 func(path string, s st) error 15 16 func Impl(path string, s st) error { 17 s.Name() 18 return nil 19 } 20 21 type MyIface interface { 22 FooBar(s *st) 23 } 24 type MyIface2 interface { 25 MyIface 26 } 27 28 type impl struct{} 29 30 func (im impl) FooBar(s *st) {} 31 32 func FooWrong(im impl) { // WARN im can be MyIface 33 im.FooBar(nil) 34 } 35 36 type FooBarFunc func(s st)