用户登录和接口鉴权
This commit is contained in:
21
vendor/google.golang.org/protobuf/proto/decode.go
generated
vendored
21
vendor/google.golang.org/protobuf/proto/decode.go
generated
vendored
@@ -8,6 +8,7 @@ import (
|
||||
"google.golang.org/protobuf/encoding/protowire"
|
||||
"google.golang.org/protobuf/internal/encoding/messageset"
|
||||
"google.golang.org/protobuf/internal/errors"
|
||||
"google.golang.org/protobuf/internal/flags"
|
||||
"google.golang.org/protobuf/internal/genid"
|
||||
"google.golang.org/protobuf/internal/pragma"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
@@ -46,12 +47,6 @@ type UnmarshalOptions struct {
|
||||
// RecursionLimit limits how deeply messages may be nested.
|
||||
// If zero, a default limit is applied.
|
||||
RecursionLimit int
|
||||
|
||||
//
|
||||
// NoLazyDecoding turns off lazy decoding, which otherwise is enabled by
|
||||
// default. Lazy decoding only affects submessages (annotated with [lazy =
|
||||
// true] in the .proto file) within messages that use the Opaque API.
|
||||
NoLazyDecoding bool
|
||||
}
|
||||
|
||||
// Unmarshal parses the wire-format message in b and places the result in m.
|
||||
@@ -109,16 +104,6 @@ func (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out proto
|
||||
if o.DiscardUnknown {
|
||||
in.Flags |= protoiface.UnmarshalDiscardUnknown
|
||||
}
|
||||
|
||||
if !allowPartial {
|
||||
// This does not affect how current unmarshal functions work, it just allows them
|
||||
// to record this for lazy the decoding case.
|
||||
in.Flags |= protoiface.UnmarshalCheckRequired
|
||||
}
|
||||
if o.NoLazyDecoding {
|
||||
in.Flags |= protoiface.UnmarshalNoLazyDecoding
|
||||
}
|
||||
|
||||
out, err = methods.Unmarshal(in)
|
||||
} else {
|
||||
o.RecursionLimit--
|
||||
@@ -171,6 +156,10 @@ func (o UnmarshalOptions) unmarshalMessageSlow(b []byte, m protoreflect.Message)
|
||||
var err error
|
||||
if fd == nil {
|
||||
err = errUnknown
|
||||
} else if flags.ProtoLegacy {
|
||||
if fd.IsWeak() && fd.Message().IsPlaceholder() {
|
||||
err = errUnknown // weak referent is not linked in
|
||||
}
|
||||
}
|
||||
|
||||
// Parse the field value.
|
||||
|
||||
Reference in New Issue
Block a user