mirror of
https://github.com/bgp/stayrtr.git
synced 2024-05-06 15:54:54 +00:00
Merge pull request #37 from mellowdrifter/master
Don't abuse main() with too much crap. Just let it be an entrypoint.
This commit is contained in:
@ -485,6 +485,13 @@ func (m *metricsEvent) UpdateMetrics(numIPv4 int, numIPv6 int, numIPv4filtered i
|
||||
}
|
||||
|
||||
func main() {
|
||||
if err := run(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "%s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func run() error {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
flag.Parse()
|
||||
@ -701,4 +708,5 @@ func main() {
|
||||
|
||||
s.routineUpdate(*CacheBin, *RefreshInterval, slurmFile)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user