Debian Codegraph @

stylecheck/st1006/testdata/go1.0/CheckReceiverNames/CheckReceiverNames.go

raw
1 // Package pkg ...
2 package pkg
3
4 type T1 int
5
6 func (x T1) Fn1() {}
7 func (y T1) Fn2() {}
8 func (x T1) Fn3() {}
9 func (T1) Fn4() {}
10 func (_ T1) Fn5() {} //@ diag(`receiver name should not be an underscore, omit the name if it is unused`)
11 func (self T1) Fn6() {} //@ diag(`receiver name should be a reflection of its identity`)