-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 issues #2980 #2994
fix issues #2980 #2994
Conversation
@houseme 之前的PR关掉了,我重新提交一个,帅哥哥帮忙看看o.O |
@houseme The previous PR was closed, I will resubmit one, handsome brother, please help me take a look o.O |
@oldme-git Any updates. |
@gqcn 匿名结构体在 doStruct 的递归中丢失了细节信息,看一下这个代码示例:
第一次执行数据绑定时,嵌套结构体中时间字段尚且是空的,所以可以绑定成功。当递归到第二次的时候,嵌套结构体有了默认值,在执行 bindVarToReflectValueWithInterfaceCheck 时,触发了 gtime 的 UnmarshalText 方法,使时间细节丢失。 这里面的逻辑有些绕,具体的这段代码在 gconv_struct.go 的 409 行 444 行。 强哥有什么其他的好的修改方法吗? |
@gqcn Anonymous structures lose details in the recursion of doStruct. Take a look at this code example:
**When performing data binding for the first time, the time field in the nested structure is still empty, so the binding can be successful. When the recursion reaches the second time, the nested structure has a default value. When bindVarToReflectValueWithInterfaceCheck is executed, the UnmarshalText method of gtime is triggered, causing the time details to be lost. ** The logic here is a bit convoluted. The specific code is in lines 409 and 444 of gconv_struct.go. Brother Qiang, do you have any other good modification methods? |
我看看呢 |
Let me take a look |
你好,感谢持续参与框架建设!转换组件这块是框架中比较复杂的组件,我仔细看了下源码,确实可能一些特殊的结构体对象会触发一些常见的接口转换,比较典型的就是 |
好,我来看一下 |
OK, let me take a look |
gconv.Scan() is the time zone consistent in recursive. View at #2980, please.