MCPcopy
hub / github.com/golang/protobuf / ForMessage

Function ForMessage

descriptor/descriptor.go:45–47  ·  view source on GitHub ↗

ForMessage returns the file descriptor proto containing the message and the message descriptor proto for the message itself. The returned proto messages must not be mutated. Deprecated: Not all concrete message types satisfy the Message interface. Use MessageDescriptorProto instead. If possible, th

(m Message)

Source from the content-addressed store, hash-verified

43// be rewritten to use protobuf reflection instead.
44// See package "google.golang.org/protobuf/reflect/protoreflect" for details.
45func ForMessage(m Message) (*descriptorpb.FileDescriptorProto, *descriptorpb.DescriptorProto) {
46 return MessageDescriptorProto(m)
47}
48
49type rawDesc struct {
50 fileDesc []byte

Callers

nothing calls this directly

Calls 1

MessageDescriptorProtoFunction · 0.85

Tested by

no test coverage detected