Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(util/gconv): #3797 暂时修复结构体和字段名字重复时,有一定几率会覆盖 #3798

Closed
wants to merge 2 commits into from

Conversation

wln32
Copy link
Member

@wln32 wln32 commented Sep 23, 2024

Updates #3797 不完全修复,对于字段和结构体同名时,字段如果为零值时,有几率会重新初始化结构体
建议以后类似问题,解决方案是:不要把名字搞成一样的

2.添加http和gconv的测试
2.补充测试issue#3797,以及嵌套结构体同名不同类型字段
3.过滤掉gmeta.Meta类型的字段
4.对于匿名结构体字段不带tag的,不再缓存
5.增加一些工具函数
@wln32 wln32 requested a review from gqcn September 23, 2024 16:52
Copy link

@wln32 wln32 closed this Sep 23, 2024
@wln32 wln32 deleted the issue/3797 branch September 23, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

util/gconv: Fields with the same name in nested structures overwrite values
1 participant