Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2017-08-17 20:24:14 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2017-09-08 16:42:59 +0300
commitcdb4ab073c7c4c3a9ef53df4c6f13e6642878395 (patch)
tree290824074f2135278eb610b92a4c16aa30f4b624 /main.go
parent740ae0ce780b71c5d669a265f63ddd9095214704 (diff)
Use namsral/flag to support environment vars for config
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.go b/main.go
index 1cfac409..ba301a70 100644
--- a/main.go
+++ b/main.go
@@ -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()