From 0703eeb262a29fab06619d7c7f31ad024982b428 Mon Sep 17 00:00:00 2001 From: Thomas Pelletier Date: Tue, 23 Mar 2021 18:01:14 -0400 Subject: [PATCH] Fix bug parsing anonymous structs --- targets.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/targets.go b/targets.go index fb531b0..b11f57a 100644 --- a/targets.go +++ b/targets.go @@ -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")