Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: simplify mock handling #190

Merged
merged 1 commit into from
Oct 14, 2024
Merged

feat: simplify mock handling #190

merged 1 commit into from
Oct 14, 2024

Conversation

smlx
Copy link
Owner

@smlx smlx commented Oct 14, 2024

mockgen generated mocks are now expected to be:

  • in the same directory as the _test.go files
  • suffixed _mock_test.go, so they are handled correctly by the go
    tooling (ignored during build, coverage calculation etc.)
  • in the same package as the _test.go files

mockgen generated mocks are now expected to be:

* in the same directory as the _test.go files
* suffixed _mock_test.go, so they are handled correctly by the go
  tooling (ignored during build, coverage calculation etc.)
* in the same package as the _test.go files

Example:

  mockgen -source=foo.go -package=foo_test -destination=foo_mock_test.go -write_generate_directive
@smlx smlx merged commit 9539c92 into main Oct 14, 2024
11 checks passed
@smlx smlx deleted the simplify-mock branch October 14, 2024 07:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant