diff --git a/README.md b/README.md index fdc6e39..822d04d 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ moq [flags] source-dir interface [interface2 [interface3 [...]]] output file (default stdout) -pkg string package name (default will infer) + -stub + return zero values when no mock implementation is provided, do not panic Specifying an alias for the mock is also supported with the format 'interface:alias' Ex: moq -pkg different . MyInterface:MyMock ``` diff --git a/main.go b/main.go index 9b2b4ca..238a2da 100644 --- a/main.go +++ b/main.go @@ -26,7 +26,7 @@ func main() { flag.StringVar(&flags.outFile, "out", "", "output file (default stdout)") flag.StringVar(&flags.pkgName, "pkg", "", "package name (default will infer)") flag.StringVar(&flags.formatter, "fmt", "", "go pretty-printer: gofmt (default) or goimports") - flag.BoolVar(&flags.stubImpl, "stubImpl", false, + flag.BoolVar(&flags.stubImpl, "stub", false, "return zero values when no mock implementation is provided, do not panic") flag.Usage = func() {