修复配置更新错误问题
This commit is contained in:
32
cmd/test.go
Normal file
32
cmd/test.go
Normal 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,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user