🎨 改进代码样式

This commit is contained in:
github-actions[bot]
2021-12-13 13:15:16 +00:00
parent 3fba704c77
commit 6b4045db45
7 changed files with 7 additions and 11 deletions

View File

@@ -16,11 +16,9 @@ func init() {
if err := recover(); err != nil { //产生了panic异常
log.Println(err)
}
}() //别忘了(), 调用此匿名函数
process.SleepAbout1sTo2s()
_ = os.MkdirAll(dbpath, 0755)
model.Initialize(dbfile)
}()
}

View File

@@ -38,7 +38,6 @@ func init() {
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(fmt.Sprintf("早安成功!你的睡眠时长为%d时%d分%d秒,你是今天第%d个起床的", hour, minute, second, position)))
}
db.Close()
})
engine.OnFullMatch("晚安", isEvening, zero.OnlyGroup).SetBlock(true).SetPriority(prio).
Handle(func(ctx *zero.Ctx) {
@@ -56,7 +55,6 @@ func init() {
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(fmt.Sprintf("晚安成功!你的清醒时长为%d时%d分%d秒,你是今天第%d个睡觉的", hour, minute, second, position)))
}
db.Close()
})
}