feat: add yaml config support

This commit is contained in:
loveuer
2025-03-20 11:55:47 +08:00
parent 32b30ae183
commit 2e13671bb7
9 changed files with 139 additions and 145 deletions

View File

@ -42,10 +42,10 @@ func (h *Handler) Setting(in *SettingReq, out *Resp[bool]) error {
defer opt.Locker.Unlock()
if in.Debug {
opt.Debug = true
opt.Cfg.Debug = true
log.Info(h.Ctx, "set global debug[true]")
} else {
opt.Debug = false
opt.Cfg.Debug = false
log.Info(h.Ctx, "set global debug[false]")
}