MCPcopy
hub / github.com/protocolbuffers/protobuf-go / Format

Function Format

encoding/prototext/encode.go:33–35  ·  view source on GitHub ↗

Format formats the message as a multiline string. This function is only intended for human consumption and ignores errors. Do not depend on the output being stable. Its output will change across different builds of your program, even when using the same version of the protobuf module.

(m proto.Message)

Source from the content-addressed store, hash-verified

31// different builds of your program, even when using the same version of the
32// protobuf module.
33func Format(m proto.Message) string {
34 return MarshalOptions{Multiline: true}.Format(m)
35}
36
37// Marshal writes the given [proto.Message] in textproto format using default
38// options. Do not depend on the output being stable. Its output will change

Callers 15

TestDecodeFunction · 0.92
TestEncodeFunction · 0.92
TestEncodeDeterministicFunction · 0.92
TestEqualFunction · 0.92
TestMergeFromNilFunction · 0.92
StringMethod · 0.92

Calls 1

FormatMethod · 0.45

Tested by 11

TestDecodeFunction · 0.74
TestEncodeFunction · 0.74
TestEncodeDeterministicFunction · 0.74
TestEqualFunction · 0.74
TestMergeFromNilFunction · 0.74