func main() { flag.Parse() api.NewServer() api.InitApi() api.StartServer() api.AuthorizedAtHeyService() c := make(chan os.Signal) signal.Notify(c, os.Interrupt, syscall.SIGINT, syscall.SIGTERM) <-c api.StopServer() }
func main() { flag.StringVar(&flagConfigFile, "config", "config.json", "") flag.Parse() utils.LoadConfig(flagConfigFile) api.NewServer() api.InitApi() web.InitWeb() api.StartServer() c := make(chan os.Signal) signal.Notify(c, os.Interrupt, syscall.SIGINT, syscall.SIGTERM) <-c api.StopServer() }