Skip to content

Commit

Permalink
Move flag.Parse() to main() in case other packages use flags
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed May 6, 2015
1 parent e12428e commit abe3e5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ func init() {
flag.StringVar(&config.Root, "root", config.DefaultRoot, "Root path to default site")
flag.StringVar(&config.Host, "host", config.DefaultHost, "Default host")
flag.StringVar(&config.Port, "port", config.DefaultPort, "Default port")
flag.Parse()

config.AppName = "Caddy"
config.AppVersion = "0.6.0"
}

func main() {
flag.Parse()

var wg sync.WaitGroup

// Set CPU cap
Expand Down

0 comments on commit abe3e5f

Please sign in to comment.