mock
mock copied to clipboard
feat: `mockgen` flag `--build_constraint` to add `//go:build` directives
Resolves #190
Note that //go:generate has unusual handling of flags with spaces so the quotes have to include the flag name (example) for complex constraints. This revealed a bug in --write_generate_directive, which just prints space-delimited os.Args.
The workaround of using --copyright_file is neither viable (it adds a space between // and go:build) nor good practice as overloading functionality can result in bugs due to unanticipated usage (e.g. the aforementioned space).
is this getting reviewed/merged any time soon?
Hi, we need this functionality too. When we can get it?