keep ignoring errors that were ignored before

This commit is contained in:
Denis Bilenko 2024-12-10 11:16:45 +01:00
parent e1c607bcfd
commit cc7a46d545
2 changed files with 6 additions and 9 deletions

View File

@ -126,9 +126,8 @@ func fromTypedStruct(src reflect.Value, ref dyn.Value, options ...fromTypedOptio
// Either if the key was set in the reference or the field is not zero-valued, we include it.
if ok || nv.Kind() != dyn.KindNil {
if err := out.Set(refk, nv); err != nil {
return dyn.InvalidValue, err
}
// QQQ log error?
_ = out.Set(refk, nv)
}
}
@ -186,9 +185,8 @@ func fromTypedMap(src reflect.Value, ref dyn.Value) (dyn.Value, error) {
// Every entry is represented, even if it is a nil.
// Otherwise, a map with zero-valued structs would yield a nil as well.
if err := out.Set(refk, nv); err != nil {
return dyn.InvalidValue, err
}
// QQQ log error?
_ = out.Set(refk, nv)
}
return dyn.V(out), nil

View File

@ -70,9 +70,8 @@ func decodeValue(decoder *json.Decoder, o *Offset) (dyn.Value, error) {
return invalidValueWithLocation(decoder, o), err
}
if err := obj.Set(keyVal, val); err != nil {
return invalidValueWithLocation(decoder, o), err
}
// QQQ log this?
_ = obj.Set(keyVal, val)
}
// Consume the closing '}'
if _, err := decoder.Token(); err != nil {