格式化代码

This commit is contained in:
huangxiaolei
2022-12-19 13:40:04 +08:00
parent f773ba8df7
commit 58b2df2bc6
92 changed files with 682 additions and 626 deletions

View File

@@ -18,7 +18,7 @@ func Run(ctx context.Context, configFile string) error {
config.InitConfig(configFile)
logger.InitLogger("dispatch")
logger.LOG.Info("dispatch start")
logger.Warn("dispatch start")
db := dao.NewDao()
defer db.CloseDao()
@@ -32,10 +32,10 @@ func Run(ctx context.Context, configFile string) error {
case <-ctx.Done():
return nil
case s := <-c:
logger.LOG.Info("get a signal %s", s.String())
logger.Warn("get a signal %s", s.String())
switch s {
case syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT:
logger.LOG.Info("dispatch exit")
logger.Warn("dispatch exit")
time.Sleep(time.Second)
return nil