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

Method Text

proto/text_encode.go:43–46  ·  view source on GitHub ↗

Text returns a proto text formatted string of m.

(m Message)

Source from the content-addressed store, hash-verified

41
42// Text returns a proto text formatted string of m.
43func (tm *TextMarshaler) Text(m Message) string {
44 b, _ := tm.marshal(m)
45 return string(b)
46}
47
48func (tm *TextMarshaler) marshal(m Message) ([]byte, error) {
49 mr := MessageReflect(m)

Callers 5

anyEqualFunction · 0.80
TestMarshalGoldenFunction · 0.80
TestMarshalUnknownAnyFunction · 0.80
MarshalTextStringFunction · 0.80
CompactTextStringFunction · 0.80

Calls 1

marshalMethod · 0.95

Tested by 3

anyEqualFunction · 0.64
TestMarshalGoldenFunction · 0.64
TestMarshalUnknownAnyFunction · 0.64