-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
var structA struct {
ID int `json:"id" msgpack:"id"`
}
var structB []struct {
structA
Title string `json:"title" msgpack:"title"`
}
for _, s := range structAarrs {
item := struct {
structA
Title string `json:"title" msgpack:"title"`
}{
Title: Title,
}
item.structA= s
structB = append(structB, item)
}expect:
[
{
"id": 1,
"title": "title"
}
]actual:
[
{
"structA": {
"id": 1
},
"title": "title"
}
]shamaton
Metadata
Metadata
Assignees
Labels
No labels