Add noop formatter as an option (#133)

Useful to print the generated source code for debugging.
This commit is contained in:
Suhas Karanth
2020-08-16 12:55:01 +05:30
committed by GitHub
parent e3d1bd8a7e
commit 005b899ec8
8 changed files with 154 additions and 28 deletions

View File

@@ -25,7 +25,7 @@ func main() {
var flags userFlags
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.StringVar(&flags.formatter, "fmt", "", "go pretty-printer: gofmt, goimports or noop (default gofmt)")
flag.BoolVar(&flags.stubImpl, "stub", false,
"return zero values when no mock implementation is provided, do not panic")