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

feat(issue-38): Add .env support #54

Closed
wants to merge 5 commits into from
Closed

feat(issue-38): Add .env support #54

wants to merge 5 commits into from

Conversation

amanvr
Copy link
Contributor

@amanvr amanvr commented May 26, 2023

Fixes #38

main.go Outdated
@@ -15,6 +17,9 @@ var resources embed.FS
func main() {
logger.PrintInfo("nearForm: k8s kurated addons CLI")

// load .env file
godotenv.Load(".env")
Copy link
Member

@LucaLanziani LucaLanziani May 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice for the user to be able to specify the file, a KKA_CONFIG_FILE environment variable would be more than enough.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the configuration file doesn't exist it might be worth it to crash the program to avoid building things with the wrong parameters.

@LucaLanziani
Copy link
Member

It would also be go to write a small test for the cli.go to test that environment variables are loaded correctly.

@LucaLanziani LucaLanziani deleted the feat/issue-38 branch August 28, 2023 08:44
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.

Define configuration file that can be used to pass parameter to the cli
2 participants