refactor(config): 更新配置文件适配器的数据结构和类型安全

- 将 jsonMap 从 StrAnyMap 类型更改为泛型 KVMap[string, *gjson.Json] 类型
- 添加 jsonMapChecker 函数用于 JSON 对象验证
- 使用 NewKVMapWithChecker 替代 NewStrAnyMap 提高类型安全性
- 修改 GetOrSetFuncLock 回调函数返回类型为 *gjson.Json
- 简化数据库链接关闭日志中的键值转换逻辑
This commit is contained in:
shanyujie
2026-01-19 17:44:07 +08:00
parent 465324551a
commit 95a20ea1e4
2 changed files with 12 additions and 9 deletions

View File

@ -119,7 +119,7 @@ func (c *Core) Close(ctx context.Context) (err error) {
if err != nil {
err = gerror.WrapCode(gcode.CodeDbOperationError, err, `db.Close failed`)
}
intlog.Printf(ctx, `close link: %s, err: %v`, k, err)
intlog.Printf(ctx, `close link: %s, err: %v`, gconv.String(k), err)
if err != nil {
return
}