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

Function Format

encoding/protojson/encode.go:31–33  ·  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

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

Callers 1

Example_sanitizeStringsFunction · 0.92

Calls 1

FormatMethod · 0.45

Tested by 1

Example_sanitizeStringsFunction · 0.74