Closed wln32 closed 2 months ago
gconv先把struct转成map
在循环赋值时,如果先拿到的key是id的话,正常赋值成功没有什么问题
第二次是rule时
会走empty.IsNil分支,从而把原值100覆盖掉了
因为Rule结构体和里面的Rule字段重名导致被覆盖
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
gconv first converts struct into map
During the loop assignment, if the key obtained first is the id, there will be no problem with the normal assignment succeeding.
The second time is when rule
Will take the empty.IsNil branch, thereby overwriting the original value of 100
Go version
1.22
GoFrame version
2.7.3
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
What did you see happen?
What did you expect to see?
什么都不输出,赋值正确即可