feat: str转struct

This commit is contained in:
2025-10-13 14:20:40 +08:00
parent 2100caa5e4
commit efab8cb6d2
3 changed files with 45 additions and 2 deletions

View File

@ -22,7 +22,13 @@ type BaseValuePtrResult[BaseType op_type.BaseType] struct {
}
// MapValueResult map类型转换结果
type MapValueResult[Key comparable, Value comparable] struct {
type MapValueResult[Key comparable, Value any] struct {
Value map[Key]Value `json:"result"` // 转换结果
Err error `json:"err"` // 错误信息
}
// StructValueResult struct类型转换结果
type StructValueResult[Value any] struct {
Value Value `json:"result"` // 转换结果
Err error `json:"err"` // 错误信息
}