Allow configuration through config file and from args #153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
Ive implemented a little piece of code that allow to use a configFile for configuration.
Actually you can still provide configuration from args and now from configFile also.
It doesn't do anything if you didn't provide the --config.file so its safe for existing deployment.
A configuration can look like :
Its a small modification, actually i think another config / args implementation like viper / kong should be used instead of kingpin which is not realy maintained anymore.
(in my point of view, using a lib for a little project like this is overkill and maybe a simple implementation could be better).
For security consideration, i think my PR would be very benefit as now credentials would be in a config-file instead of args.
Hope you will agree to merge :)
Thanks you