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

rm flag #151

Merged
merged 1 commit into from
Jul 11, 2021
Merged

rm flag #151

merged 1 commit into from
Jul 11, 2021

Conversation

soniah
Copy link
Contributor

@soniah soniah commented Jul 2, 2021

No description provided.

@soniah
Copy link
Contributor Author

soniah commented Jul 2, 2021

See conversation in #149

@soniah soniah mentioned this pull request Jul 2, 2021
@soniah
Copy link
Contributor Author

soniah commented Jul 6, 2021

@sudo-suhas about your question Is it possible to add a test for this change? Short answer - no - not without making significant changes to main.go.

func run() in main.go isn't currently tested. To properly test it you would need to pass in a filesystem interface using something like https://github.com/spf13/afero, which I doubt you want to do.

See various blog articles like these for more explanation:

So, what would be the next steps? 😄

@sudo-suhas sudo-suhas merged commit ab5b7bc into matryer:master Jul 11, 2021
@sudo-suhas
Copy link
Collaborator

Thanks @soniah for the PR!

The feature has been tagged and released in moq v0.2.3 🎉

@mislav
Copy link

mislav commented Jul 28, 2021

@soniah Thank you for this! Just what our project needed. 🚀

@soniah
Copy link
Contributor Author

soniah commented Jul 28, 2021

You're welcome, saves a lot of problems 😊

In Makefiles you can do something like MOCKS ?= $(shell find . -type f -name '*_mock_gen.go' -not -path "./vendor/*") then rm -f $(MOCKS) but that's tedious 🤕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants