-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexported genericBatch prevents GoMock mockgen on Querier interface #84
Comments
Does using source mode help? golang/mock#297 |
I am using source mode. It will generate a |
It would work fine for generating mocks within the same package but I would like the generated mocks to be in a separate package. A couple options would be to make |
Fixed after batch queries were removed in #93 |
I am trying to use GoMock to generate a mock for the pggen
Querier
interface. https://github.com/golang/mockThe problem is the struct generated by mockgen cannot have methods with the unexported
genericBatch
interface as params on the mockedBatch
andScan
methods. I tried copying thegenericBatch
into the mock package and while that makes the methods on the struct work, the struct does not satisfy theQuerier
interface anymore because theQuerier
interface expects the methods to have its package's unexportedgenericBatch
interface.Shouldn't we be able to mock the
Querier
interface?The text was updated successfully, but these errors were encountered: