Debian Codegraph @

stylecheck/st1016/testdata/go1.0/CheckReceiverNamesIdentical/CheckReceiverNames.go

raw
1 // Package pkg ...
2 package pkg
3
4 type T1 int
5
6 func (x T1) Fn1() {} //@ diag(`methods on the same type should have the same receiver name`)
7 func (y T1) Fn2() {}
8 func (x T1) Fn3() {}
9 func (T1) Fn4() {}
10 func (_ T1) Fn5() {}
11 func (self T1) Fn6() {}
12
13 func (bar T3) Fn2() {} //@ diag(`1x "bar", 1x "meow"`)
14 func (meow T3) Fn3() {}
15
16 func (bar T4) Fn2() {}