Commit dd3ff0fc authored by Matthew Holt's avatar Matthew Holt

Shows site addresses at start; new -quiet flag

parent d0881945
...@@ -13,19 +13,20 @@ import ( ...@@ -13,19 +13,20 @@ import (
var ( var (
conf string conf string
http2 bool http2 bool // TODO: temporary flag until http2 is standard
quiet bool
) )
func init() { func init() {
flag.StringVar(&conf, "conf", config.DefaultConfigFile, "the configuration file to use") flag.StringVar(&conf, "conf", config.DefaultConfigFile, "the configuration file to use")
flag.BoolVar(&http2, "http2", true, "enable HTTP/2 support") // temporary flag until http2 merged into std lib flag.BoolVar(&http2, "http2", true, "enable HTTP/2 support") // TODO: temporary flag until http2 merged into std lib
flag.BoolVar(&quiet, "quiet", false, "quiet mode (no initialization output)")
flag.Parse()
} }
func main() { func main() {
var wg sync.WaitGroup var wg sync.WaitGroup
flag.Parse()
// Load config from file // Load config from file
allConfigs, err := config.Load(conf) allConfigs, err := config.Load(conf)
if err != nil { if err != nil {
...@@ -60,6 +61,12 @@ func main() { ...@@ -60,6 +61,12 @@ func main() {
log.Println(err) log.Println(err)
} }
}(s) }(s)
if !quiet {
for _, config := range configs {
fmt.Printf("%s -> OK\n", config.Address())
}
}
} }
wg.Wait() wg.Wait()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment