go mod tidy && go mod vendor (update dependencies)
This commit is contained in:
parent
7c9bbfa9aa
commit
e53167b6a1
1
go.mod
1
go.mod
|
@ -24,7 +24,6 @@ require (
|
|||
golang.org/x/text v0.3.6 // indirect
|
||||
google.golang.org/genproto v0.0.0-20210406143921-e86de6bf7a46 // indirect
|
||||
google.golang.org/grpc v1.37.0
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 // indirect
|
||||
google.golang.org/protobuf v1.27.1
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
gopkg.in/ini.v1 v1.51.0
|
||||
|
|
3
go.sum
3
go.sum
|
@ -309,8 +309,6 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
|
|||
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.37.0 h1:uSZWeQJX5j11bIQ4AJoj+McDBo29cY1MCoC1wO3ts+c=
|
||||
google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 h1:TLkBREm4nIsEcexnCjgQd5GQWaHcqMzwQV0TX9pq8S0=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
|
@ -321,7 +319,6 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
|
|||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
|
|
|
@ -744,9 +744,6 @@ func (d decoder) skipValue() error {
|
|||
// Skip items. This will not validate whether skipped values are
|
||||
// of the same type or not, same behavior as C++
|
||||
// TextFormat::Parser::AllowUnknownField(true) version 3.8.0.
|
||||
if err := d.skipValue(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -263,3 +263,8 @@ func (e *Encoder) Snapshot() encoderState {
|
|||
func (e *Encoder) Reset(es encoderState) {
|
||||
e.encoderState = es
|
||||
}
|
||||
|
||||
// AppendString appends the escaped form of the input string to b.
|
||||
func AppendString(b []byte, s string) []byte {
|
||||
return appendString(b, s, false)
|
||||
}
|
||||
|
|
|
@ -440,6 +440,13 @@ func legacyMerge(in piface.MergeInput) piface.MergeOutput {
|
|||
if !ok {
|
||||
return piface.MergeOutput{}
|
||||
}
|
||||
if !in.Source.IsValid() {
|
||||
// Legacy Marshal methods may not function on nil messages.
|
||||
// Check for a typed nil source only after we confirm that
|
||||
// legacy Marshal/Unmarshal methods are present, for
|
||||
// consistency.
|
||||
return piface.MergeOutput{Flags: piface.MergeComplete}
|
||||
}
|
||||
b, err := marshaler.Marshal()
|
||||
if err != nil {
|
||||
return piface.MergeOutput{}
|
||||
|
|
|
@ -52,8 +52,8 @@ import (
|
|||
// 10. Send out the CL for review and submit it.
|
||||
const (
|
||||
Major = 1
|
||||
Minor = 26
|
||||
Patch = 0
|
||||
Minor = 27
|
||||
Patch = 1
|
||||
PreRelease = ""
|
||||
)
|
||||
|
||||
|
|
|
@ -94,7 +94,8 @@ type Files struct {
|
|||
// Note that enum values are in the top-level since that are in the same
|
||||
// scope as the parent enum.
|
||||
descsByName map[protoreflect.FullName]interface{}
|
||||
filesByPath map[string]protoreflect.FileDescriptor
|
||||
filesByPath map[string][]protoreflect.FileDescriptor
|
||||
numFiles int
|
||||
}
|
||||
|
||||
type packageDescriptor struct {
|
||||
|
@ -117,18 +118,17 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error {
|
|||
r.descsByName = map[protoreflect.FullName]interface{}{
|
||||
"": &packageDescriptor{},
|
||||
}
|
||||
r.filesByPath = make(map[string]protoreflect.FileDescriptor)
|
||||
r.filesByPath = make(map[string][]protoreflect.FileDescriptor)
|
||||
}
|
||||
path := file.Path()
|
||||
if prev := r.filesByPath[path]; prev != nil {
|
||||
if prev := r.filesByPath[path]; len(prev) > 0 {
|
||||
r.checkGenProtoConflict(path)
|
||||
err := errors.New("file %q is already registered", file.Path())
|
||||
err = amendErrorWithCaller(err, prev, file)
|
||||
if r == GlobalFiles && ignoreConflict(file, err) {
|
||||
err = nil
|
||||
}
|
||||
err = amendErrorWithCaller(err, prev[0], file)
|
||||
if !(r == GlobalFiles && ignoreConflict(file, err)) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
for name := file.Package(); name != ""; name = name.Parent() {
|
||||
switch prev := r.descsByName[name]; prev.(type) {
|
||||
|
@ -168,7 +168,8 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error {
|
|||
rangeTopLevelDescriptors(file, func(d protoreflect.Descriptor) {
|
||||
r.descsByName[d.FullName()] = d
|
||||
})
|
||||
r.filesByPath[path] = file
|
||||
r.filesByPath[path] = append(r.filesByPath[path], file)
|
||||
r.numFiles++
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -308,6 +309,7 @@ func (s *nameSuffix) Pop() (name protoreflect.Name) {
|
|||
// FindFileByPath looks up a file by the path.
|
||||
//
|
||||
// This returns (nil, NotFound) if not found.
|
||||
// This returns an error if multiple files have the same path.
|
||||
func (r *Files) FindFileByPath(path string) (protoreflect.FileDescriptor, error) {
|
||||
if r == nil {
|
||||
return nil, NotFound
|
||||
|
@ -316,13 +318,19 @@ func (r *Files) FindFileByPath(path string) (protoreflect.FileDescriptor, error)
|
|||
globalMutex.RLock()
|
||||
defer globalMutex.RUnlock()
|
||||
}
|
||||
if fd, ok := r.filesByPath[path]; ok {
|
||||
return fd, nil
|
||||
}
|
||||
fds := r.filesByPath[path]
|
||||
switch len(fds) {
|
||||
case 0:
|
||||
return nil, NotFound
|
||||
case 1:
|
||||
return fds[0], nil
|
||||
default:
|
||||
return nil, errors.New("multiple files named %q", path)
|
||||
}
|
||||
}
|
||||
|
||||
// NumFiles reports the number of registered files.
|
||||
// NumFiles reports the number of registered files,
|
||||
// including duplicate files with the same name.
|
||||
func (r *Files) NumFiles() int {
|
||||
if r == nil {
|
||||
return 0
|
||||
|
@ -331,10 +339,11 @@ func (r *Files) NumFiles() int {
|
|||
globalMutex.RLock()
|
||||
defer globalMutex.RUnlock()
|
||||
}
|
||||
return len(r.filesByPath)
|
||||
return r.numFiles
|
||||
}
|
||||
|
||||
// RangeFiles iterates over all registered files while f returns true.
|
||||
// If multiple files have the same name, RangeFiles iterates over all of them.
|
||||
// The iteration order is undefined.
|
||||
func (r *Files) RangeFiles(f func(protoreflect.FileDescriptor) bool) {
|
||||
if r == nil {
|
||||
|
@ -344,12 +353,14 @@ func (r *Files) RangeFiles(f func(protoreflect.FileDescriptor) bool) {
|
|||
globalMutex.RLock()
|
||||
defer globalMutex.RUnlock()
|
||||
}
|
||||
for _, file := range r.filesByPath {
|
||||
for _, files := range r.filesByPath {
|
||||
for _, file := range files {
|
||||
if !f(file) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// NumFilesByPackage reports the number of registered files in a proto package.
|
||||
func (r *Files) NumFilesByPackage(name protoreflect.FullName) int {
|
||||
|
|
|
@ -43,7 +43,6 @@ package descriptorpb
|
|||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
@ -829,15 +828,6 @@ func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) {
|
|||
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
var extRange_ExtensionRangeOptions = []protoiface.ExtensionRangeV1{
|
||||
{Start: 1000, End: 536870911},
|
||||
}
|
||||
|
||||
// Deprecated: Use ExtensionRangeOptions.ProtoReflect.Descriptor.ExtensionRanges instead.
|
||||
func (*ExtensionRangeOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
|
||||
return extRange_ExtensionRangeOptions
|
||||
}
|
||||
|
||||
func (x *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption {
|
||||
if x != nil {
|
||||
return x.UninterpretedOption
|
||||
|
@ -1520,15 +1510,6 @@ func (*FileOptions) Descriptor() ([]byte, []int) {
|
|||
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
var extRange_FileOptions = []protoiface.ExtensionRangeV1{
|
||||
{Start: 1000, End: 536870911},
|
||||
}
|
||||
|
||||
// Deprecated: Use FileOptions.ProtoReflect.Descriptor.ExtensionRanges instead.
|
||||
func (*FileOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
|
||||
return extRange_FileOptions
|
||||
}
|
||||
|
||||
func (x *FileOptions) GetJavaPackage() string {
|
||||
if x != nil && x.JavaPackage != nil {
|
||||
return *x.JavaPackage
|
||||
|
@ -1776,15 +1757,6 @@ func (*MessageOptions) Descriptor() ([]byte, []int) {
|
|||
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
var extRange_MessageOptions = []protoiface.ExtensionRangeV1{
|
||||
{Start: 1000, End: 536870911},
|
||||
}
|
||||
|
||||
// Deprecated: Use MessageOptions.ProtoReflect.Descriptor.ExtensionRanges instead.
|
||||
func (*MessageOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
|
||||
return extRange_MessageOptions
|
||||
}
|
||||
|
||||
func (x *MessageOptions) GetMessageSetWireFormat() bool {
|
||||
if x != nil && x.MessageSetWireFormat != nil {
|
||||
return *x.MessageSetWireFormat
|
||||
|
@ -1930,15 +1902,6 @@ func (*FieldOptions) Descriptor() ([]byte, []int) {
|
|||
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
var extRange_FieldOptions = []protoiface.ExtensionRangeV1{
|
||||
{Start: 1000, End: 536870911},
|
||||
}
|
||||
|
||||
// Deprecated: Use FieldOptions.ProtoReflect.Descriptor.ExtensionRanges instead.
|
||||
func (*FieldOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
|
||||
return extRange_FieldOptions
|
||||
}
|
||||
|
||||
func (x *FieldOptions) GetCtype() FieldOptions_CType {
|
||||
if x != nil && x.Ctype != nil {
|
||||
return *x.Ctype
|
||||
|
@ -2030,15 +1993,6 @@ func (*OneofOptions) Descriptor() ([]byte, []int) {
|
|||
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
var extRange_OneofOptions = []protoiface.ExtensionRangeV1{
|
||||
{Start: 1000, End: 536870911},
|
||||
}
|
||||
|
||||
// Deprecated: Use OneofOptions.ProtoReflect.Descriptor.ExtensionRanges instead.
|
||||
func (*OneofOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
|
||||
return extRange_OneofOptions
|
||||
}
|
||||
|
||||
func (x *OneofOptions) GetUninterpretedOption() []*UninterpretedOption {
|
||||
if x != nil {
|
||||
return x.UninterpretedOption
|
||||
|
@ -2101,15 +2055,6 @@ func (*EnumOptions) Descriptor() ([]byte, []int) {
|
|||
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
var extRange_EnumOptions = []protoiface.ExtensionRangeV1{
|
||||
{Start: 1000, End: 536870911},
|
||||
}
|
||||
|
||||
// Deprecated: Use EnumOptions.ProtoReflect.Descriptor.ExtensionRanges instead.
|
||||
func (*EnumOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
|
||||
return extRange_EnumOptions
|
||||
}
|
||||
|
||||
func (x *EnumOptions) GetAllowAlias() bool {
|
||||
if x != nil && x.AllowAlias != nil {
|
||||
return *x.AllowAlias
|
||||
|
@ -2183,15 +2128,6 @@ func (*EnumValueOptions) Descriptor() ([]byte, []int) {
|
|||
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
var extRange_EnumValueOptions = []protoiface.ExtensionRangeV1{
|
||||
{Start: 1000, End: 536870911},
|
||||
}
|
||||
|
||||
// Deprecated: Use EnumValueOptions.ProtoReflect.Descriptor.ExtensionRanges instead.
|
||||
func (*EnumValueOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
|
||||
return extRange_EnumValueOptions
|
||||
}
|
||||
|
||||
func (x *EnumValueOptions) GetDeprecated() bool {
|
||||
if x != nil && x.Deprecated != nil {
|
||||
return *x.Deprecated
|
||||
|
@ -2258,15 +2194,6 @@ func (*ServiceOptions) Descriptor() ([]byte, []int) {
|
|||
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{16}
|
||||
}
|
||||
|
||||
var extRange_ServiceOptions = []protoiface.ExtensionRangeV1{
|
||||
{Start: 1000, End: 536870911},
|
||||
}
|
||||
|
||||
// Deprecated: Use ServiceOptions.ProtoReflect.Descriptor.ExtensionRanges instead.
|
||||
func (*ServiceOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
|
||||
return extRange_ServiceOptions
|
||||
}
|
||||
|
||||
func (x *ServiceOptions) GetDeprecated() bool {
|
||||
if x != nil && x.Deprecated != nil {
|
||||
return *x.Deprecated
|
||||
|
@ -2335,15 +2262,6 @@ func (*MethodOptions) Descriptor() ([]byte, []int) {
|
|||
return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17}
|
||||
}
|
||||
|
||||
var extRange_MethodOptions = []protoiface.ExtensionRangeV1{
|
||||
{Start: 1000, End: 536870911},
|
||||
}
|
||||
|
||||
// Deprecated: Use MethodOptions.ProtoReflect.Descriptor.ExtensionRanges instead.
|
||||
func (*MethodOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
|
||||
return extRange_MethodOptions
|
||||
}
|
||||
|
||||
func (x *MethodOptions) GetDeprecated() bool {
|
||||
if x != nil && x.Deprecated != nil {
|
||||
return *x.Deprecated
|
||||
|
|
|
@ -156,7 +156,7 @@ google.golang.org/grpc/serviceconfig
|
|||
google.golang.org/grpc/stats
|
||||
google.golang.org/grpc/status
|
||||
google.golang.org/grpc/tap
|
||||
# google.golang.org/protobuf v1.26.0
|
||||
# google.golang.org/protobuf v1.27.1
|
||||
google.golang.org/protobuf/encoding/prototext
|
||||
google.golang.org/protobuf/encoding/protowire
|
||||
google.golang.org/protobuf/internal/descfmt
|
||||
|
|
Loading…
Reference in New Issue