templatectl icon indicating copy to clipboard operation
templatectl copied to clipboard

Move template package out of internal

Open gottwald opened this issue 4 years ago • 2 comments

This make the package directly usable in other code without calling the command. Also introduce a changable LookupFunc which makes it easier to use templatectl in tests and fake the env without touching the env of the running system.

gottwald avatar Nov 17 '20 11:11 gottwald

Hi @gottwald

Thank you for the contribution. The Template function is fairly simple and it's not intended to be imported as a package. Also, we do a simple environment lookup, I'm not sure why we need to mock it. It looks like we don't do anything within this PR either. I think we can close this PR as I don't want to export. the internal package, but let me know if you have anything to add.

fatih avatar Mar 18 '21 23:03 fatih

The reason we had to import it as a package was in a testing case where we aren't able to modify the env, so we decided to fake it. We could also fork the package, it's not that big of a deal.

gottwald avatar Mar 19 '21 20:03 gottwald