-
Notifications
You must be signed in to change notification settings - Fork 608
Can't mock internal interfaces #29
Comments
Is somewhat related to #4. If the PR for that issue were tweaked to create the temp dir in the same folder as the destination file, I think it would actually fix this issue as well. Until it is fixed, you can workaround it with the following bash script (I use it on linux, haven't tested on OSX):
|
This seems like the same issue as mocking unexported interfaces. If it's an internal interface, you should either make the mock equally internal, or expose the interface. Who's going to be using the interface otherwise? Mock packages should be nearby the thing they are generated from. |
I am attempting to make the mock equally internal (I'm creating the mock as part of the same package that contains the interfaces being mocked), the problem is that mockgen creates a temporary file outside of the
|
I should note that it may have been go1.5 that enforced the |
FYI I am still seeing this with mockgen 1.6.0:
|
I get the following:
The text was updated successfully, but these errors were encountered: