github.com/amarpal/go-tools@v0.0.0-20240422043104-40142f59f616/stylecheck/st1006/testdata/src/example.com/CheckReceiverNames/CheckReceiverNames.go (about) 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`)