summaryrefslogtreecommitdiff
path: root/vendor/github.com/golang/mock/mockgen/tests/generated_identifier_conflict/README.md
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2019-07-02 12:12:53 +0200
committerDimitri Sokolyuk <demon@dim13.org>2019-07-02 12:12:53 +0200
commit473acc61c8392dc7ae303d91568e179c4f105a76 (patch)
treea2070cba25f918cda460387e587dd60551b23894 /vendor/github.com/golang/mock/mockgen/tests/generated_identifier_conflict/README.md
parentdd45f63209a8e51979b11182253ee80b5289c10a (diff)
add black list
Diffstat (limited to 'vendor/github.com/golang/mock/mockgen/tests/generated_identifier_conflict/README.md')
-rw-r--r--vendor/github.com/golang/mock/mockgen/tests/generated_identifier_conflict/README.md26
1 files changed, 0 insertions, 26 deletions
diff --git a/vendor/github.com/golang/mock/mockgen/tests/generated_identifier_conflict/README.md b/vendor/github.com/golang/mock/mockgen/tests/generated_identifier_conflict/README.md
deleted file mode 100644
index ffb5f9f..0000000
--- a/vendor/github.com/golang/mock/mockgen/tests/generated_identifier_conflict/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-The generated mock methods use some hardcoded variable/receiver names that can
-have conflicts with the argument names that are defined by the code for which
-the mock is generated when using the source generation method.
-
-Example:
-
-```go
-type Example interface {
- Method(_m, _mr, m, mr int)
-}
-```
-
-```go
-// Method mocks base method
-func (_m *MockExample) Method(_m int, _mr int, m int, mr int) {
- _m.ctrl.Call(_m, "Method", _m, _mr, m, mr)
-}
-```
-
-In the above example one of the interface method parameters is called `_m`
-but unfortunately the generated receiver name is also called `_m` so the
-mock code won't compile.
-
-The generator has to make sure that generated identifiers (e.g.: the receiver
-names) are always different from the arg names that might come from external
-sources.