Skip to content

Commit

Permalink
Update the readme with -rm and -version flags (#189)
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Bussolo <[email protected]>
Co-authored-by: Mat Ryer <[email protected]>
  • Loading branch information
gabrielbussolo and matryer authored Mar 29, 2023
1 parent d0d706b commit 13fb492
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,25 @@ $ go install github.com/matryer/moq@latest

```
moq [flags] source-dir interface [interface2 [interface3 [...]]]
-fmt string
go pretty-printer: gofmt, goimports or noop (default gofmt)
-out string
output file (default stdout)
-pkg string
package name (default will infer)
-stub
return zero values when no mock implementation is provided, do not panic
-fmt string
go pretty-printer: gofmt, goimports or noop (default gofmt)
-out string
output file (default stdout)
-pkg string
package name (default will infer)
-rm
first remove output file, if it exists
-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
-with-resets
generate functions to facilitate resetting calls made to a mock
Specifying an alias for the mock is also supported with the format 'interface:alias'
Example: moq -pkg different . MyInterface:MyMock
Ex: moq -pkg different . MyInterface:MyMock
```

**NOTE:** `source-dir` is the directory where the source code (definition) of the target interface is located.
Expand Down

0 comments on commit 13fb492

Please sign in to comment.