Commit abe3e5f5 authored by Matthew Holt's avatar Matthew Holt

Move flag.Parse() to main() in case other packages use flags

parent e12428ef
...@@ -34,13 +34,14 @@ func init() { ...@@ -34,13 +34,14 @@ func init() {
flag.StringVar(&config.Root, "root", config.DefaultRoot, "Root path to default site") flag.StringVar(&config.Root, "root", config.DefaultRoot, "Root path to default site")
flag.StringVar(&config.Host, "host", config.DefaultHost, "Default host") flag.StringVar(&config.Host, "host", config.DefaultHost, "Default host")
flag.StringVar(&config.Port, "port", config.DefaultPort, "Default port") flag.StringVar(&config.Port, "port", config.DefaultPort, "Default port")
flag.Parse()
config.AppName = "Caddy" config.AppName = "Caddy"
config.AppVersion = "0.6.0" config.AppVersion = "0.6.0"
} }
func main() { func main() {
flag.Parse()
var wg sync.WaitGroup var wg sync.WaitGroup
// Set CPU cap // Set CPU cap
......
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