-
Notifications
You must be signed in to change notification settings - Fork 72
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
Support env variables for config (#111) #177
Conversation
@nikonhub Thanks for the PR! Approach looks solid - please address the golangci-lint findings |
@kehoecj There is a gocyclo error. But I also see another PR opened with the same error on the same function. How should we handle this ? |
Ignore - after hacktoberfest I'll go back and do some refactoring to satisfy gocyclone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a section to the README.md describing how users can use environment variables in addition to or instead of the command line arguments.
Make sure it's clear that a command line var will override an env var
Tested functionality - everything looks good on that end!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for the PR @nikonhub !
closes : #111
We could have used os.Getenv() directly as default value for flag.String(). But the are multiple uses of isFlagSet() in the code, which would return false even if the variable is set through the env.