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.
However, unexpected behaviors may occur due to differences in mockgen behavior depending on which mockgen the user has installed.
Ideally, it would be nice to be able to generate mocks without using user-installed mockgen and we can achieve that if we can import mockgen.
The text was updated successfully, but these errors were encountered:
This seems similarish to #424. I am not against this this idea but it is a large task. The APIs for mockgen are not really meant to be used directly today and are not ergonomic. Much refactoring and a detailed design would need to be in place before a change like this landed. I would like to leave this open for a bit to see if there is more demand for something like this as it would be a large feature I think.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi team.
What
It would be nice if the core logic of mockgen is placed in some package other than
main
. This makes mockgen importable.main
package should contain only CLI-related processes such as option parsing.Why
Users can import mockgen features. (In Go, we cannot import
main
package.)This allows users
...etc
For example, I am developing a tool, called
gomockhandler
, to manage mocks of gomock.https://github.com/sanposhiho/gomockhandler
Users need to install mockgen to use gomockhandler and gomockhandler calls mockgen through
exec.Command
.https://github.com/sanposhiho/gomockhandler/blob/master/internal/mockgen/sourcemode/runner.go#L68
However, unexpected behaviors may occur due to differences in mockgen behavior depending on which mockgen the user has installed.
Ideally, it would be nice to be able to generate mocks without using user-installed mockgen and we can achieve that if we can import mockgen.
The text was updated successfully, but these errors were encountered: