You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
If you vendor a dependency into vendor/, what's the best way to generate mocks for it?
If you use mockgen to generate mocks for that specific version of it, e.g. mockgen a/vendor/somedependency, the generated mock has the wrong import: import somedependency "a/vendor/somedependency".
The workaround I'm currently using is making sure the version in $GOPATH/src/a/vendor/somedependency matches the version in $GOPATH/src/somedependency, and then running mockgen somedependency generates the correct code. This is cumbersome!
hectorj, dskarataev, st0nx, vikstrous, HelloGrayson and 6 more