mockery
mockery copied to clipboard
Remove named interface
Description
Can't believe I didn't realize we can do this before :) We don't need to create the constructor testing interface for each mock; we can use an anonymous type.
Version of Golang used when building/testing:
- [x] 1.19
How Has This Been Tested?
Yes :)
Checklist
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
D'oh! I think this should be fine to remove for people who send mocks to the mocks
directory, but what about people who use --inpkg
? They might rely on this now.
I honestly don't think that they would. I don't see a reason. But yeah, "officially" this is a BC-break. If you wanna play it safe, just merge it into v3 branch :)