fix: structure ignore tag not working in nest struct

This commit is contained in:
wwqgtxx
2025-12-04 14:44:34 +08:00
parent 90470ac304
commit 91f5593f4e
2 changed files with 28 additions and 0 deletions

View File

@@ -517,6 +517,10 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e
fieldName = tagValue
}
if tagValue == "-" {
continue
}
rawMapKey := reflect.ValueOf(fieldName)
rawMapVal := dataVal.MapIndex(rawMapKey)
if !rawMapVal.IsValid() {