mirror of
https://github.com/LBRYFoundation/tracker.git
synced 2025-08-23 17:47:29 +00:00
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.")
|
flag.StringVar(&configPath, "config", "", "Provide the filesystem path of a valid configuration file.")
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func Boot() {
|
||||||
defer glog.Flush()
|
defer glog.Flush()
|
||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
glog.Info("parsed flags")
|
|
||||||
|
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
glog.Info("set gomaxprocs to ", runtime.NumCPU())
|
glog.Info("set gomaxprocs to ", runtime.NumCPU())
|
||||||
|
@ -68,3 +67,7 @@ func main() {
|
||||||
http.Serve(cfg)
|
http.Serve(cfg)
|
||||||
glog.Info("gracefully shutdown")
|
glog.Info("gracefully shutdown")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
Boot()
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue