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

Function MarshalText

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

MarshalText writes the proto text format of m to w.

(w io.Writer, m Message)

Source from the content-addressed store, hash-verified

95
96// MarshalText writes the proto text format of m to w.
97func MarshalText(w io.Writer, m Message) error { return defaultTextMarshaler.Marshal(w, m) }
98
99// MarshalTextString returns a proto text formatted string of m.
100func MarshalTextString(m Message) string { return defaultTextMarshaler.Text(m) }

Callers 5

TestMarshalTextFunction · 0.92
TestMarshalTextNilFunction · 0.92
TestStringEscapingFunction · 0.92
TestMarshalTextFailingFunction · 0.92

Calls 1

MarshalMethod · 0.65

Tested by 5

TestMarshalTextFunction · 0.74
TestMarshalTextNilFunction · 0.74
TestStringEscapingFunction · 0.74
TestMarshalTextFailingFunction · 0.74