summaryrefslogtreecommitdiffstats
path: root/vendor/google.golang.org/protobuf/reflect/protoreflect
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-08-13 16:14:26 +0200
committerGitHub <noreply@github.com>2022-08-13 16:14:26 +0200
commit6a3fc713978a0c1c9290a4afd08b47886b49b635 (patch)
treeaa62cd85cf5671646c75ee38b3fc140ef7edcea8 /vendor/google.golang.org/protobuf/reflect/protoreflect
parent3c4192ebf6a32e30cdd23a9644c2ceca72a006fa (diff)
downloadmatterbridge-msglm-6a3fc713978a0c1c9290a4afd08b47886b49b635.tar.gz
matterbridge-msglm-6a3fc713978a0c1c9290a4afd08b47886b49b635.tar.bz2
matterbridge-msglm-6a3fc713978a0c1c9290a4afd08b47886b49b635.zip
Update dependencies and go1.18 (#1873)
* Update dependencies and go1.18 * Exclude unnecessary linters and update build to go1.18
Diffstat (limited to 'vendor/google.golang.org/protobuf/reflect/protoreflect')
-rw-r--r--vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go32
-rw-r--r--vendor/google.golang.org/protobuf/reflect/protoreflect/source.go1
-rw-r--r--vendor/google.golang.org/protobuf/reflect/protoreflect/type.go1
-rw-r--r--vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go2
4 files changed, 22 insertions, 14 deletions
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go
index dd85915b..55aa1492 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go
@@ -8,8 +8,7 @@
// defined in proto source files and value interfaces which provide the
// ability to examine and manipulate the contents of messages.
//
-//
-// Protocol Buffer Descriptors
+// # Protocol Buffer Descriptors
//
// Protobuf descriptors (e.g., EnumDescriptor or MessageDescriptor)
// are immutable objects that represent protobuf type information.
@@ -26,8 +25,7 @@
// The "google.golang.org/protobuf/reflect/protodesc" package converts between
// google.protobuf.DescriptorProto messages and protobuf descriptors.
//
-//
-// Go Type Descriptors
+// # Go Type Descriptors
//
// A type descriptor (e.g., EnumType or MessageType) is a constructor for
// a concrete Go type that represents the associated protobuf descriptor.
@@ -41,8 +39,7 @@
// The "google.golang.org/protobuf/types/dynamicpb" package can be used to
// create Go type descriptors from protobuf descriptors.
//
-//
-// Value Interfaces
+// # Value Interfaces
//
// The Enum and Message interfaces provide a reflective view over an
// enum or message instance. For enums, it provides the ability to retrieve
@@ -55,13 +52,11 @@
// The "github.com/golang/protobuf/proto".MessageReflect function can be used
// to obtain a reflective view on older messages.
//
-//
-// Relationships
+// # Relationships
//
// The following diagrams demonstrate the relationships between
// various types declared in this package.
//
-//
// ┌───────────────────────────────────┐
// V │
// ┌────────────── New(n) ─────────────┐ │
@@ -83,7 +78,6 @@
//
// • An Enum is a concrete enum instance. Generated enums implement Enum.
//
-//
// ┌──────────────── New() ─────────────────┐
// │ │
// │ ┌─── Descriptor() ─────┐ │ ┌── Interface() ───┐
@@ -98,12 +92,22 @@
//
// • A MessageType describes a concrete Go message type.
// It has a MessageDescriptor and can construct a Message instance.
+// Just as how Go's reflect.Type is a reflective description of a Go type,
+// a MessageType is a reflective description of a Go type for a protobuf message.
//
// • A MessageDescriptor describes an abstract protobuf message type.
-//
-// • A Message is a concrete message instance. Generated messages implement
-// ProtoMessage, which can convert to/from a Message.
-//
+// It has no understanding of Go types. In order to construct a MessageType
+// from just a MessageDescriptor, you can consider looking up the message type
+// in the global registry using protoregistry.GlobalTypes.FindMessageByName
+// or constructing a dynamic MessageType using dynamicpb.NewMessageType.
+//
+// • A Message is a reflective view over a concrete message instance.
+// Generated messages implement ProtoMessage, which can convert to a Message.
+// Just as how Go's reflect.Value is a reflective view over a Go value,
+// a Message is a reflective view over a concrete protobuf message instance.
+// Using Go reflection as an analogy, the ProtoReflect method is similar to
+// calling reflect.ValueOf, and the Message.Interface method is similar to
+// calling reflect.Value.Interface.
//
// ┌── TypeDescriptor() ──┐ ┌───── Descriptor() ─────┐
// │ V │ V
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go
index 121ba3a0..0b994288 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go
@@ -87,6 +87,7 @@ func (p1 SourcePath) Equal(p2 SourcePath) bool {
// in a future version of this module.
//
// Example output:
+//
// .message_type[6].nested_type[15].field[3]
func (p SourcePath) String() string {
b := p.appendFileDescriptorProto(nil)
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
index 8e53c44a..3867470d 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
@@ -480,6 +480,7 @@ type ExtensionDescriptors interface {
// relative to the parent that it is declared within.
//
// For example:
+//
// syntax = "proto2";
// package example;
// message FooMessage {
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
index eb7764c3..ca8e28c5 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
@@ -50,6 +50,7 @@ import (
// always references the source object.
//
// For example:
+//
// // Append a 0 to a "repeated int32" field.
// // Since the Value returned by Mutable is guaranteed to alias
// // the source message, modifying the Value modifies the message.
@@ -392,6 +393,7 @@ func (v Value) MapKey() MapKey {
// ╚═════════╧═════════════════════════════════════╝
//
// A MapKey is constructed and accessed through a Value:
+//
// k := ValueOf("hash").MapKey() // convert string to MapKey
// s := k.String() // convert MapKey to string
//