mirror of
https://github.com/restic/restic.git
synced 2025-12-13 10:32:40 +00:00
Update vendored dependencies
This commit is contained in:
3
vendor/github.com/golang/protobuf/jsonpb/jsonpb.go
generated
vendored
3
vendor/github.com/golang/protobuf/jsonpb/jsonpb.go
generated
vendored
@@ -673,7 +673,8 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe
|
||||
if targetType.Kind() == reflect.Ptr {
|
||||
// If input value is "null" and target is a pointer type, then the field should be treated as not set
|
||||
// UNLESS the target is structpb.Value, in which case it should be set to structpb.NullValue.
|
||||
if string(inputValue) == "null" && targetType != reflect.TypeOf(&stpb.Value{}) {
|
||||
_, isJSONPBUnmarshaler := target.Interface().(JSONPBUnmarshaler)
|
||||
if string(inputValue) == "null" && targetType != reflect.TypeOf(&stpb.Value{}) && !isJSONPBUnmarshaler {
|
||||
return nil
|
||||
}
|
||||
target.Set(reflect.New(targetType.Elem()))
|
||||
|
||||
Reference in New Issue
Block a user