修复配置更新错误问题

This commit is contained in:
2025-08-19 17:25:01 +08:00
parent 95c1a34ea4
commit 261ee88a4b
3 changed files with 36 additions and 9 deletions

32
cmd/test.go Normal file
View File

@@ -0,0 +1,32 @@
package main
import (
"fmt"
"log/slog"
"zzman/actions"
"zzman/clients"
"zzman/model"
"github.com/joho/godotenv"
)
func main() {
// 初始化环境
slog.Debug("初始化环境变量")
err := godotenv.Load()
if err != nil {
slog.Error(fmt.Errorf("初始化变量失败:%w", err).Error())
}
// 初始化数据库和 Redis
model.Init()
defer model.Close()
clients.InitRedis()
defer clients.CloseRedis()
// 测试功能
actions.Update(actions.UpdateArgs{
Mock: true,
})
}