55// Package descriptor provides functions for obtaining the protocol buffer
66// descriptors of generated Go types.
77//
8- // Deprecated: Use the "google.golang.org/protobuf/reflect/protoreflect"
9- // package instead to obtain an EnumDescriptor or MessageDescriptor in order to
8+ // Deprecated: See the "google.golang.org/protobuf/reflect/protoreflect" package
9+ // for how to obtain an EnumDescriptor or MessageDescriptor in order to
1010// programatically interact with the protobuf type system.
1111package descriptor
1212
@@ -99,8 +99,8 @@ func deriveRawDescriptor(d protoreflect.Descriptor) ([]byte, []int) {
9999 return file , idxs
100100}
101101
102- // EnumRawDescriptor returns the GZIP'd raw file descriptor containing the
103- // enum and the index path to reach the enum declaration.
102+ // EnumRawDescriptor returns the GZIP'd raw file descriptor representing
103+ // the enum and the index path to reach the enum declaration.
104104// The returned slices must not be mutated.
105105func EnumRawDescriptor (e proto.GeneratedEnum ) ([]byte , []int ) {
106106 if ev , ok := e .(interface { EnumDescriptor () ([]byte , []int ) }); ok {
@@ -110,7 +110,7 @@ func EnumRawDescriptor(e proto.GeneratedEnum) ([]byte, []int) {
110110 return deriveRawDescriptor (ed .Descriptor ())
111111}
112112
113- // MessageRawDescriptor returns the GZIP'd raw file descriptor containing
113+ // MessageRawDescriptor returns the GZIP'd raw file descriptor representing
114114// the message and the index path to reach the message declaration.
115115// The returned slices must not be mutated.
116116func MessageRawDescriptor (m proto.GeneratedMessage ) ([]byte , []int ) {
@@ -148,7 +148,7 @@ func deriveFileDescriptor(rawDesc []byte) *descriptorpb.FileDescriptorProto {
148148 return fd
149149}
150150
151- // EnumDescriptorProto returns the file descriptor proto containing
151+ // EnumDescriptorProto returns the file descriptor proto representing
152152// the enum and the enum descriptor proto for the enum itself.
153153// The returned proto messages must not be mutated.
154154func EnumDescriptorProto (e proto.GeneratedEnum ) (* descriptorpb.FileDescriptorProto , * descriptorpb.EnumDescriptorProto ) {
@@ -168,7 +168,7 @@ func EnumDescriptorProto(e proto.GeneratedEnum) (*descriptorpb.FileDescriptorPro
168168 return fd , ed
169169}
170170
171- // MessageDescriptorProto returns the file descriptor proto containing
171+ // MessageDescriptorProto returns the file descriptor proto representing
172172// the message and the message descriptor proto for the message itself.
173173// The returned proto messages must not be mutated.
174174func MessageDescriptorProto (m proto.GeneratedMessage ) (* descriptorpb.FileDescriptorProto , * descriptorpb.DescriptorProto ) {
0 commit comments