mirror of
https://github.com/unti-io/go-utils.git
synced 2025-10-06 00:36:57 +08:00
[v1.4.2] ToStringMap
This commit is contained in:
@@ -177,3 +177,8 @@ func (this *StructStruct) Slice(obj any) (slice []any) {
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
// ToStringMap - 将结构体转换为map[string]any
|
||||
func (this *StructStruct) ToStringMap(obj any) (result map[string]any) {
|
||||
return cast.ToStringMap(Json.Encode(obj))
|
||||
}
|
Reference in New Issue
Block a user