-
Notifications
You must be signed in to change notification settings - Fork 620
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 configuration via command line arguments #79
Labels
Milestone
Comments
magiconair
added a commit
that referenced
this issue
Apr 9, 2016
* support cmdline, env vars and properties * support env vars with and without a FABIO_ prefix * support loading properties from URL Inspired by PR #63 from @doublerebel
Closed
magiconair
added a commit
that referenced
this issue
Apr 9, 2016
* support cmdline, env vars and properties * support env vars with and without a FABIO_ prefix * support loading properties from URL * support consul agent on https Inspired by PR #63 from @doublerebel
Closed
magiconair
added a commit
that referenced
this issue
May 17, 2016
* support cmdline, env vars and properties * support env vars with and without a FABIO_ prefix * support loading properties from URL * support consul agent on https Inspired by PR #63 from @doublerebel
magiconair
added a commit
that referenced
this issue
May 17, 2016
* support cmdline, env vars and properties * support env vars with and without a FABIO_ prefix * support loading properties from URL * support consul agent on https Inspired by PR #63 from @doublerebel
magiconair
added a commit
that referenced
this issue
May 29, 2016
* support cmdline, env vars and properties * support env vars with and without a FABIO_ prefix * support loading properties from URL * support consul agent on https Inspired by PR #63 from @doublerebel
magiconair
added a commit
that referenced
this issue
Jun 8, 2016
* support cmdline, env vars and properties * support env vars with and without a FABIO_ prefix * support loading properties from URL * support consul agent on https Inspired by PR #63 from @doublerebel
magiconair
added a commit
that referenced
this issue
Jun 15, 2016
* support cmdline, env vars and properties * support env vars with and without a FABIO_ prefix * support loading properties from URL * support consul agent on https Inspired by PR #63 from @doublerebel
magiconair
added a commit
that referenced
this issue
Jul 12, 2016
* support cmdline, env vars and properties * support env vars with and without a FABIO_ prefix * support loading properties from URL * support consul agent on https Inspired by PR #63 from @doublerebel
magiconair
added a commit
that referenced
this issue
Jul 16, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PR #63 spawned the discussion on supporting command line arguments in addition to environment variables. The suggested approach was to use
github.com/spf13/viper
also to reduce the amount of homegrown code.The PR requires updates to two other projects which all have not been merged yet and adds three more libraries to the code. Also or because of this, the PR has been stale for a couple of weeks now. However, credit for the idea and the motivation belongs to @doublerebel.
I like the idea of supporting command line arguments and came up with an implementation that uses the
flag.FlagSet
from the Go standard library to achieve the same thing. All values can now be set either via command line, environment or properties. Environment variables are case insensitive and support an optionalFABIO_
prefix. So bothPROXY_ADDR
andFABIO_PROXY_ADDR
are valid but theFABIO_
prefixed values are preferred.As an added bonus the
github.com/magiconair/properties
library was updated to 1.7.0 which now supports loading properties files from URLs.The text was updated successfully, but these errors were encountered: