mockery icon indicating copy to clipboard operation
mockery copied to clipboard

Remove named interface

Open grongor opened this issue 2 years ago • 2 comments

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

grongor avatar Aug 17 '22 19:08 grongor

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.

LandonTClipp avatar Sep 19 '22 03:09 LandonTClipp

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 :)

grongor avatar Sep 19 '22 08:09 grongor