diff options
Diffstat (limited to 'src/mongo/gotools/vendor/src/github.com/3rf/mongo-lint/testdata/receiver-names.go')
-rw-r--r-- | src/mongo/gotools/vendor/src/github.com/3rf/mongo-lint/testdata/receiver-names.go | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/mongo/gotools/vendor/src/github.com/3rf/mongo-lint/testdata/receiver-names.go b/src/mongo/gotools/vendor/src/github.com/3rf/mongo-lint/testdata/receiver-names.go new file mode 100644 index 00000000000..58f567dae43 --- /dev/null +++ b/src/mongo/gotools/vendor/src/github.com/3rf/mongo-lint/testdata/receiver-names.go @@ -0,0 +1,38 @@ +// Test for bad receiver names. + +// Package foo ... +package foo + +type foo struct{} + +func (this foo) f1() { // MATCH /should be a reflection of its identity/ +} + +func (self foo) f2() { // MATCH /should be a reflection of its identity/ +} + +func (f foo) f3() { +} + +func (foo) f4() { +} + +type bar struct{} + +func (b bar) f1() { +} + +func (b bar) f2() { +} + +func (a bar) f3() { // MATCH /receiver name a should be consistent with previous receiver name b for bar/ +} + +func (a *bar) f4() { // MATCH /receiver name a should be consistent with previous receiver name b for bar/ +} + +func (b *bar) f5() { +} + +func (bar) f6() { +} |