func main() { runtime.GOMAXPROCS(runtime.NumCPU()) if err := service.Run(registry.GetRegistry()); err != nil { fmt.Printf("Service exited with error: %s\n", err) os.Exit(255) } else { fmt.Println("Service exited gracefully") } }
func main() { r, err := GetRegistry() if err != nil { fmt.Printf("Service exited with error: %s\n", err) os.Exit(255) } if err := service.Run(r); err != nil { fmt.Printf("Service exited with error: %s\n", err) os.Exit(255) } else { fmt.Println("Service exited gracefully") } }