Fix bug parsing anonymous structs

This commit is contained in:
Thomas Pelletier
2021-03-23 18:01:14 -04:00
parent d458ddf4d4
commit 0703eeb262
+1 -3
View File
@@ -483,9 +483,7 @@ func scopeStruct(v reflect.Value, name string) (target, bool, error) {
f := t.Field(i)
if f.PkgPath != "" {
// only consider exported fields
continue
}
if f.Anonymous {
} else if f.Anonymous {
walk(v.Field(i))
} else {
fieldName, ok := f.Tag.Lookup("toml")