Skip to content
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

remove dependency on mockgen executable #7

Closed
PereRohit opened this issue Sep 15, 2022 · 1 comment · Fixed by #13
Closed

remove dependency on mockgen executable #7

PereRohit opened this issue Sep 15, 2022 · 1 comment · Fixed by #13
Labels
enhancement New feature or request

Comments

@PereRohit
Copy link
Owner

If mockgen is not installed on the users system, the process fails and the generated files are deleted. Maybe the user wants to use a different mocking framework or write their own mock code.

Let the generated files be as is and display a message for mocks not generated due to missing mockgen.

Can additionally add a flag --install-deps that can install dependencies like mockgen if not found.

@PereRohit PereRohit added the enhancement New feature or request label Sep 15, 2022
@PereRohit
Copy link
Owner Author

mockgen integrates well with the existing go testing package and provides functions that are used for validation and/or mocking.
Instead of removing this, let's install the required mockgen before generating the mocks using go install

go install github.com/golang/mock/mockgen@v1.6.0

PereRohit added a commit that referenced this issue Sep 23, 2022
Added step to install mockgen
@PereRohit PereRohit mentioned this issue Sep 23, 2022
@PereRohit PereRohit linked a pull request Sep 23, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant