Fix bug parsing anonymous structs
This commit is contained in:
+1
-3
@@ -483,9 +483,7 @@ func scopeStruct(v reflect.Value, name string) (target, bool, error) {
|
|||||||
f := t.Field(i)
|
f := t.Field(i)
|
||||||
if f.PkgPath != "" {
|
if f.PkgPath != "" {
|
||||||
// only consider exported fields
|
// only consider exported fields
|
||||||
continue
|
} else if f.Anonymous {
|
||||||
}
|
|
||||||
if f.Anonymous {
|
|
||||||
walk(v.Field(i))
|
walk(v.Field(i))
|
||||||
} else {
|
} else {
|
||||||
fieldName, ok := f.Tag.Lookup("toml")
|
fieldName, ok := f.Tag.Lookup("toml")
|
||||||
|
|||||||
Reference in New Issue
Block a user