diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-08-17 20:24:14 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-09-08 16:42:59 +0300 |
commit | cdb4ab073c7c4c3a9ef53df4c6f13e6642878395 (patch) | |
tree | 290824074f2135278eb610b92a4c16aa30f4b624 /main.go | |
parent | 740ae0ce780b71c5d669a265f63ddd9095214704 (diff) |
Use namsral/flag to support environment vars for config
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2,11 +2,12 @@ package main import ( "errors" - "flag" "log" "net/url" "os" "strings" + + "github.com/namsral/flag" ) // VERSION stores the information about the semantic version of application @@ -82,6 +83,7 @@ func appMain() { flag.Var(&listenHTTP, "listen-http", "The address(es) to listen on for HTTP requests") flag.Var(&listenHTTPS, "listen-https", "The address(es) to listen on for HTTPS requests") flag.Var(&listenProxy, "listen-proxy", "The address(es) to listen on for proxy requests") + flag.String(flag.DefaultConfigFlagname, "", "path to config file") flag.Parse() |