feat: 字符串转struct slice

This commit is contained in:
2025-10-13 15:21:33 +08:00
parent 033e013510
commit 80b5e4e7cc
5 changed files with 94 additions and 11 deletions

View File

@ -38,3 +38,15 @@ type BaseValueSliceResult[BaseType op_type.BaseType] struct {
Value []BaseType `json:"value"` // 转换结果
Err error `json:"err"` // 错误信息
}
// MapValueSliceResult map类型切片转换结果
type MapValueSliceResult[Key comparable, Value any] struct {
Value []map[Key]Value `json:"value"` // 转换结果
Err error `json:"err"` // 错误信息
}
// StructValueSliceResult struct类型切片转换结果
type StructValueSliceResult[Value any] struct {
Value []Value `json:"value"` // 转换结果
Err error `json:"err"` // 错误信息
}