Open
Description
If same field exists both in parent and embedded struct and url.Values has value only for parent then decoder incorrect set embedded field to same value.
type Embed struct {
A string
}
var data struct {
A string
Embed
}
form.NewDecoder().Decode(&data, url.Values{
"A": {"one"},
})
fmt.Println(data.A, data.Embed.A)
// Output: one one
If we will add "Embed.A":{"two"}
or keep only this one and remove "A": {"one"}
then it'll work as expected.