counterfeiter icon indicating copy to clipboard operation
counterfeiter copied to clipboard

generate mode accepts -o, -fake-name-template & -q

Open matt-royal opened this issue 3 years ago • 1 comments

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, is TargetName alright as the field available in the template, or would another name be better. Perhaps just Name?

/cc @joefitzgerald @maxbrunsfeld

matt-royal avatar Jan 22 '22 01:01 matt-royal

Thanks for the PR @matt-royal 🙏 I will review this weekend!

joefitzgerald avatar Jan 22 '22 03:01 joefitzgerald