mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-27 02:33:48 +08:00
Move flag.Parse() to main() in case other packages use flags
This commit is contained in:
parent
e12428efb9
commit
abe3e5f597
3
main.go
3
main.go
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user