Separate main() to allow for external inclusion
This commit is contained in:
parent
fbcf762a42
commit
6623098853
1 changed files with 5 additions and 2 deletions
7
main.go
7
main.go
|
@ -30,11 +30,10 @@ func init() {
|
|||
flag.StringVar(&configPath, "config", "", "Provide the filesystem path of a valid configuration file.")
|
||||
}
|
||||
|
||||
func main() {
|
||||
func Boot() {
|
||||
defer glog.Flush()
|
||||
|
||||
flag.Parse()
|
||||
glog.Info("parsed flags")
|
||||
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
glog.Info("set gomaxprocs to ", runtime.NumCPU())
|
||||
|
@ -68,3 +67,7 @@ func main() {
|
|||
http.Serve(cfg)
|
||||
glog.Info("gracefully shutdown")
|
||||
}
|
||||
|
||||
func main() {
|
||||
Boot()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue