isValidExtension reports whether xtd is a valid extension descriptor for md.
(md protoreflect.MessageDescriptor, xtd protoreflect.ExtensionTypeDescriptor)
| 317 | |
| 318 | // isValidExtension reports whether xtd is a valid extension descriptor for md. |
| 319 | func isValidExtension(md protoreflect.MessageDescriptor, xtd protoreflect.ExtensionTypeDescriptor) bool { |
| 320 | return xtd.ContainingMessage() == md && md.ExtensionRanges().Has(xtd.Number()) |
| 321 | } |
| 322 | |
| 323 | // isScalarKind reports whether k is a protobuf scalar kind (except bytes). |
| 324 | // This function exists for historical reasons since the representation of |
no test coverage detected