aboutsummaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/protobuf/internal/impl/codec_field.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-06 06:24:19 -0400
committerGitHub <noreply@github.com>2021-05-06 06:24:19 -0400
commit0b05ba808d5e2fc75ce10b23405bd5c05da2c331 (patch)
tree7c489ea3aa926cda031d6aaa4a852e9e6e469d14 /vendor/google.golang.org/protobuf/internal/impl/codec_field.go
parent9b9bd9e0e7b72c91d8e60103e8da7999cefbc63d (diff)
parent3de369fd696e6b98d00259d3c759d9b81df4e84b (diff)
downloadpodman-0b05ba808d5e2fc75ce10b23405bd5c05da2c331.tar.gz
podman-0b05ba808d5e2fc75ce10b23405bd5c05da2c331.tar.bz2
podman-0b05ba808d5e2fc75ce10b23405bd5c05da2c331.zip
Merge pull request #10241 from containers/dependabot/go_modules/github.com/onsi/gomega-1.12.0
Bump github.com/onsi/gomega from 1.11.0 to 1.12.0
Diffstat (limited to 'vendor/google.golang.org/protobuf/internal/impl/codec_field.go')
-rw-r--r--vendor/google.golang.org/protobuf/internal/impl/codec_field.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go
index c00744d38..cb4b482d1 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go
@@ -10,6 +10,7 @@ import (
"sync"
"google.golang.org/protobuf/encoding/protowire"
+ "google.golang.org/protobuf/internal/errors"
"google.golang.org/protobuf/proto"
pref "google.golang.org/protobuf/reflect/protoreflect"
preg "google.golang.org/protobuf/reflect/protoregistry"
@@ -20,6 +21,7 @@ type errInvalidUTF8 struct{}
func (errInvalidUTF8) Error() string { return "string field contains invalid UTF-8" }
func (errInvalidUTF8) InvalidUTF8() bool { return true }
+func (errInvalidUTF8) Unwrap() error { return errors.Error }
// initOneofFieldCoders initializes the fast-path functions for the fields in a oneof.
//
@@ -242,7 +244,7 @@ func consumeMessageInfo(b []byte, p pointer, wtyp protowire.Type, f *coderFieldI
}
v, n := protowire.ConsumeBytes(b)
if n < 0 {
- return out, protowire.ParseError(n)
+ return out, errDecode
}
if p.Elem().IsNil() {
p.SetPointer(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())))
@@ -276,7 +278,7 @@ func consumeMessage(b []byte, m proto.Message, wtyp protowire.Type, opts unmarsh
}
v, n := protowire.ConsumeBytes(b)
if n < 0 {
- return out, protowire.ParseError(n)
+ return out, errDecode
}
o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{
Buf: v,
@@ -420,7 +422,7 @@ func consumeGroup(b []byte, m proto.Message, num protowire.Number, wtyp protowir
}
b, n := protowire.ConsumeGroup(num, b)
if n < 0 {
- return out, protowire.ParseError(n)
+ return out, errDecode
}
o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{
Buf: b,
@@ -494,7 +496,7 @@ func consumeMessageSliceInfo(b []byte, p pointer, wtyp protowire.Type, f *coderF
}
v, n := protowire.ConsumeBytes(b)
if n < 0 {
- return out, protowire.ParseError(n)
+ return out, errDecode
}
m := reflect.New(f.mi.GoReflectType.Elem()).Interface()
mp := pointerOfIface(m)
@@ -550,7 +552,7 @@ func consumeMessageSlice(b []byte, p pointer, goType reflect.Type, wtyp protowir
}
v, n := protowire.ConsumeBytes(b)
if n < 0 {
- return out, protowire.ParseError(n)
+ return out, errDecode
}
mp := reflect.New(goType.Elem())
o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{
@@ -613,7 +615,7 @@ func consumeMessageSliceValue(b []byte, listv pref.Value, _ protowire.Number, wt
}
v, n := protowire.ConsumeBytes(b)
if n < 0 {
- return pref.Value{}, out, protowire.ParseError(n)
+ return pref.Value{}, out, errDecode
}
m := list.NewElement()
o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{
@@ -681,7 +683,7 @@ func consumeGroupSliceValue(b []byte, listv pref.Value, num protowire.Number, wt
}
b, n := protowire.ConsumeGroup(num, b)
if n < 0 {
- return pref.Value{}, out, protowire.ParseError(n)
+ return pref.Value{}, out, errDecode
}
m := list.NewElement()
o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{
@@ -767,7 +769,7 @@ func consumeGroupSlice(b []byte, p pointer, num protowire.Number, wtyp protowire
}
b, n := protowire.ConsumeGroup(num, b)
if n < 0 {
- return out, protowire.ParseError(n)
+ return out, errDecode
}
mp := reflect.New(goType.Elem())
o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{