Skip to content

Build constraints in generated files #190

@ARR4N

Description

@ARR4N

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions