docs/core/gconv-map #275
Replies: 2 comments
-
|
omitempty 貌似不能不转换 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
gconv.map以及mapstrstr的OmitEmpty默认配置是false,而不是true。文档没说明这一点,想要过滤空值,得手动在后面加mapOption{OmitEmpty:true},建议默认值直接为true吧。对应代码在gconv_map.go 59行,getUsedMapOption |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
docs/core/gconv-map
使用GoFrame框架中的gconv.Map方法实现类型转换,包括将任意map或struct/*struct类型转换为map[string]interface{}类型。支持属性标签和自定义标签,并可通过MapDeep方法实现递归转换,解析出嵌套对象的详细结构,适合多层次数据处理。
https://goframe.org/docs/core/gconv-map
Beta Was this translation helpful? Give feedback.
All reactions