From 66230988530cb37b7be87271c857b6c2e12c20a8 Mon Sep 17 00:00:00 2001 From: Justin Li Date: Tue, 15 Jul 2014 23:06:07 -0400 Subject: [PATCH] Separate main() to allow for external inclusion --- main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 29431b5..f836a44 100644 --- a/main.go +++ b/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() +}