forked from TrueCloudLab/restic
Update vendored dependencies
This commit is contained in:
parent
81473f4538
commit
02fc16e97d
254 changed files with 107898 additions and 82739 deletions
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()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue