chore: dependencies upgrade and move to go 1.22
This commit is contained in:
28
vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go
generated
vendored
28
vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go
generated
vendored
@@ -5,12 +5,12 @@
|
||||
// Package protoregistry provides data structures to register and lookup
|
||||
// protobuf descriptor types.
|
||||
//
|
||||
// The Files registry contains file descriptors and provides the ability
|
||||
// The [Files] registry contains file descriptors and provides the ability
|
||||
// to iterate over the files or lookup a specific descriptor within the files.
|
||||
// Files only contains protobuf descriptors and has no understanding of Go
|
||||
// [Files] only contains protobuf descriptors and has no understanding of Go
|
||||
// type information that may be associated with each descriptor.
|
||||
//
|
||||
// The Types registry contains descriptor types for which there is a known
|
||||
// The [Types] registry contains descriptor types for which there is a known
|
||||
// Go type associated with that descriptor. It provides the ability to iterate
|
||||
// over the registered types or lookup a type by name.
|
||||
package protoregistry
|
||||
@@ -30,9 +30,11 @@ import (
|
||||
// conflictPolicy configures the policy for handling registration conflicts.
|
||||
//
|
||||
// It can be over-written at compile time with a linker-initialized variable:
|
||||
//
|
||||
// go build -ldflags "-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn"
|
||||
//
|
||||
// It can be over-written at program execution with an environment variable:
|
||||
//
|
||||
// GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn ./main
|
||||
//
|
||||
// Neither of the above are covered by the compatibility promise and
|
||||
@@ -44,7 +46,7 @@ var conflictPolicy = "panic" // "panic" | "warn" | "ignore"
|
||||
// It is a variable so that the behavior is easily overridden in another file.
|
||||
var ignoreConflict = func(d protoreflect.Descriptor, err error) bool {
|
||||
const env = "GOLANG_PROTOBUF_REGISTRATION_CONFLICT"
|
||||
const faq = "https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict"
|
||||
const faq = "https://protobuf.dev/reference/go/faq#namespace-conflict"
|
||||
policy := conflictPolicy
|
||||
if v := os.Getenv(env); v != "" {
|
||||
policy = v
|
||||
@@ -216,7 +218,7 @@ func (r *Files) checkGenProtoConflict(path string) {
|
||||
|
||||
// FindDescriptorByName looks up a descriptor by the full name.
|
||||
//
|
||||
// This returns (nil, NotFound) if not found.
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
func (r *Files) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error) {
|
||||
if r == nil {
|
||||
return nil, NotFound
|
||||
@@ -308,7 +310,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 (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 {
|
||||
@@ -429,7 +431,7 @@ func rangeTopLevelDescriptors(fd protoreflect.FileDescriptor, f func(protoreflec
|
||||
// A compliant implementation must deterministically return the same type
|
||||
// if no error is encountered.
|
||||
//
|
||||
// The Types type implements this interface.
|
||||
// The [Types] type implements this interface.
|
||||
type MessageTypeResolver interface {
|
||||
// FindMessageByName looks up a message by its full name.
|
||||
// E.g., "google.protobuf.Any"
|
||||
@@ -449,7 +451,7 @@ type MessageTypeResolver interface {
|
||||
// A compliant implementation must deterministically return the same type
|
||||
// if no error is encountered.
|
||||
//
|
||||
// The Types type implements this interface.
|
||||
// The [Types] type implements this interface.
|
||||
type ExtensionTypeResolver interface {
|
||||
// FindExtensionByName looks up a extension field by the field's full name.
|
||||
// Note that this is the full name of the field as determined by
|
||||
@@ -588,7 +590,7 @@ func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interfac
|
||||
// FindEnumByName looks up an enum by its full name.
|
||||
// E.g., "google.protobuf.Field.Kind".
|
||||
//
|
||||
// This returns (nil, NotFound) if not found.
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
func (r *Types) FindEnumByName(enum protoreflect.FullName) (protoreflect.EnumType, error) {
|
||||
if r == nil {
|
||||
return nil, NotFound
|
||||
@@ -609,7 +611,7 @@ func (r *Types) FindEnumByName(enum protoreflect.FullName) (protoreflect.EnumTyp
|
||||
// FindMessageByName looks up a message by its full name,
|
||||
// e.g. "google.protobuf.Any".
|
||||
//
|
||||
// This returns (nil, NotFound) if not found.
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
func (r *Types) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) {
|
||||
if r == nil {
|
||||
return nil, NotFound
|
||||
@@ -630,7 +632,7 @@ func (r *Types) FindMessageByName(message protoreflect.FullName) (protoreflect.M
|
||||
// FindMessageByURL looks up a message by a URL identifier.
|
||||
// See documentation on google.protobuf.Any.type_url for the URL format.
|
||||
//
|
||||
// This returns (nil, NotFound) if not found.
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
func (r *Types) FindMessageByURL(url string) (protoreflect.MessageType, error) {
|
||||
// This function is similar to FindMessageByName but
|
||||
// truncates anything before and including '/' in the URL.
|
||||
@@ -660,7 +662,7 @@ func (r *Types) FindMessageByURL(url string) (protoreflect.MessageType, error) {
|
||||
// where the extension is declared and is unrelated to the full name of the
|
||||
// message being extended.
|
||||
//
|
||||
// This returns (nil, NotFound) if not found.
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
func (r *Types) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) {
|
||||
if r == nil {
|
||||
return nil, NotFound
|
||||
@@ -701,7 +703,7 @@ func (r *Types) FindExtensionByName(field protoreflect.FullName) (protoreflect.E
|
||||
// FindExtensionByNumber looks up a extension field by the field number
|
||||
// within some parent message, identified by full name.
|
||||
//
|
||||
// This returns (nil, NotFound) if not found.
|
||||
// This returns (nil, [NotFound]) if not found.
|
||||
func (r *Types) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) {
|
||||
if r == nil {
|
||||
return nil, NotFound
|
||||
|
Reference in New Issue
Block a user