Skip to content

Commit 9ea3f2a

Browse files
committed
fix: restore comment removed by mistake in previous commit
1 parent 8724a8b commit 9ea3f2a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mapstructure.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,8 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e
14651465
}
14661466

14671467
if !rawMapVal.IsValid() {
1468+
// There was no matching key in the map for the value in
1469+
// the struct. Remember it for potential errors and metadata.
14681470
if !(d.config.AllowUnsetPointer && fieldValue.Kind() == reflect.Ptr) {
14691471
targetValKeysUnused[fieldName] = struct{}{}
14701472
}

0 commit comments

Comments
 (0)