Requested feature The ability to specify build constraints to be added with //go:build <constraints> in the generated files.
Why the feature is needed Generated mocks are intended for testing but are regularly in non _test.go files to allow for cross-package imports. This risks the leakage of test-only code into production, which can easily be prevented with build constraints (example).
Requested feature The ability to specify build constraints to be added with
//go:build <constraints>
in the generated files.Why the feature is needed Generated mocks are intended for testing but are regularly in non
_test.go
files to allow for cross-package imports. This risks the leakage of test-only code into production, which can easily be prevented with build constraints (example).(Optional) Proposed solution #191