@@ -29,7 +29,7 @@ var fileCache sync.Map // map[filePath]fileDescGZIP
29
29
// RegisterFile is called from generated code to register the compressed
30
30
// FileDescriptorProto with the file path for a proto source file.
31
31
//
32
- // Deprecated: Use protoregistry.GlobalFiles.Register instead.
32
+ // Deprecated: Use protoregistry.GlobalFiles.RegisterFile instead.
33
33
func RegisterFile (s filePath , d fileDescGZIP ) {
34
34
// Decompress the descriptor.
35
35
zr , err := gzip .NewReader (bytes .NewReader (d ))
@@ -53,7 +53,7 @@ func RegisterFile(s filePath, d fileDescGZIP) {
53
53
// FileDescriptor returns the compressed FileDescriptorProto given the file path
54
54
// for a proto source file. It returns nil if not found.
55
55
//
56
- // Deprecated: Use protoregistry.GlobalFiles.RangeFilesByPath instead.
56
+ // Deprecated: Use protoregistry.GlobalFiles.FindFileByPath instead.
57
57
func FileDescriptor (s filePath ) fileDescGZIP {
58
58
if v , ok := fileCache .Load (s ); ok {
59
59
return v .(fileDescGZIP )
@@ -98,7 +98,7 @@ var numFilesCache sync.Map // map[protoreflect.FullName]int
98
98
// RegisterEnum is called from the generated code to register the mapping of
99
99
// enum value names to enum numbers for the enum identified by s.
100
100
//
101
- // Deprecated: Use protoregistry.GlobalTypes.Register instead.
101
+ // Deprecated: Use protoregistry.GlobalTypes.RegisterEnum instead.
102
102
func RegisterEnum (s enumName , _ enumsByNumber , m enumsByName ) {
103
103
if _ , ok := enumCache .Load (s ); ok {
104
104
panic ("proto: duplicate enum registered: " + s )
@@ -181,7 +181,7 @@ var messageTypeCache sync.Map // map[messageName]reflect.Type
181
181
// RegisterType is called from generated code to register the message Go type
182
182
// for a message of the given name.
183
183
//
184
- // Deprecated: Use protoregistry.GlobalTypes.Register instead.
184
+ // Deprecated: Use protoregistry.GlobalTypes.RegisterMessage instead.
185
185
func RegisterType (m Message , s messageName ) {
186
186
mt := protoimpl .X .LegacyMessageTypeOf (m , protoreflect .FullName (s ))
187
187
if err := protoregistry .GlobalTypes .RegisterMessage (mt ); err != nil {
@@ -280,7 +280,7 @@ func MessageName(m Message) messageName {
280
280
// RegisterExtension is called from the generated code to register
281
281
// the extension descriptor.
282
282
//
283
- // Deprecated: Use protoregistry.GlobalTypes.Register instead.
283
+ // Deprecated: Use protoregistry.GlobalTypes.RegisterExtension instead.
284
284
func RegisterExtension (d * ExtensionDesc ) {
285
285
if err := protoregistry .GlobalTypes .RegisterExtension (d ); err != nil {
286
286
panic (err )
0 commit comments