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

Move template package out of internal #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gottwald
Copy link

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.

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.
@fatih
Copy link
Owner

fatih commented Mar 18, 2021

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.

@gottwald
Copy link
Author

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.

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.

2 participants