-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Closed
Copy link
Labels
bugIt is confirmed a bug, but don't worry, we'll handle it.It is confirmed a bug, but don't worry, we'll handle it.
Description
Go version
1.22
GoFrame version
2.7.3
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
type Rule struct {
ID int64 `json:"id"`
Rule []*option.Rule `json:"rule"`
}
type Res1 struct {
g.Meta
Rule
}
var err error
var r = &Rule{
ID: 100,
}
var res = &Res1{}
if err = gconv.Scan(r, res); err != nil {
fmt.Println("err=", err)
return
}
for {
if res.ID == 0 {
fmt.Println("res.id")
g.Dump(res)
fmt.Printf("%+v\n", res)
time.Sleep(time.Second)
}
}
What did you see happen?
res.id
{
ID: 0,
Rule: {
ID: 0,
Rule: [],
},
}
&{Meta:{} Rule:{ID:0 Rule:[]}}
What did you expect to see?
什么都不输出,赋值正确即可
Metadata
Metadata
Assignees
Labels
bugIt is confirmed a bug, but don't worry, we'll handle it.It is confirmed a bug, but don't worry, we'll handle it.