add skip-ensure flag to avoid import cycle (#140)
For mocks generated outside of the tested package with tests lives inside the same package as the tested code (i.e. pkg_test not used) --skip-ensure suppresses import of the source pkg https://github.com/matryer/moq/issues/139 fix typo in readme
This commit is contained in:
@@ -33,6 +33,9 @@ moq [flags] source-dir interface [interface2 [interface3 [...]]]
|
||||
package name (default will infer)
|
||||
-stub
|
||||
return zero values when no mock implementation is provided, do not panic
|
||||
-skip-ensure
|
||||
suppress mock implementation check, avoid import cycle if mocks generated outside of the tested package
|
||||
|
||||
Specifying an alias for the mock is also supported with the format 'interface:alias'
|
||||
Ex: moq -pkg different . MyInterface:MyMock
|
||||
```
|
||||
|
Reference in New Issue
Block a user