counterfeiter
counterfeiter copied to clipboard
generate mode accepts -o, -fake-name-template & -q
This PR implements the feature discussed in #191. I did my best to add the feature without making invasive changes, but I did have to restructure how flags are parsed. I'm definitely open to feedback on how I can improve the commit or the feature itself. Here are some specific questions I have:
- Is
-fake-name-template
a good name for the flag? - Is
text/template
the right approach here, or would a simple regex, or a prefix + suffix flag be better? - If
text/template
works here, isTargetName
alright as the field available in the template, or would another name be better. Perhaps justName
?
/cc @joefitzgerald @maxbrunsfeld
Thanks for the PR @matt-royal 🙏 I will review this weekend!