Allow counterfeiting unexported interface methods. #112
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
I love this application and I use it religiously for many projects.
Recently I attempted to counterfeit an unexpected interface with only unexported methods. This caused counterfeiter to create code with duplicate methods and fields; it failed to compile.
This contribution is simply an example of how I worked around the problem. My feelings will be unaffected if you choose not to accept this. I just figured showing one version of a solution to the problem would help explain what I've run into. I'll be highly appreciative if you can find a way to allow unexported interfaces to be properly counterfeited.
This contribution, although a little lengthy, shows where I ran into this problem: golift/securityspy#18 - You can see the new interface and the api_fakes file that was generated with this code. I noted my changes (to make this work locally) at the top of the file.
Warm regards,
-david