...

Package msgfmt

import "google.golang.org/protobuf/internal/msgfmt"
Overview
Index

Overview ▾

Package msgfmt implements a text marshaler combining the desirable features of both the JSON and proto text formats. It is optimized for human readability and has no associated deserializer.

func Format

func Format(m proto.Message) string

Format returns a formatted string for the message.

func FormatValue

func FormatValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) string

FormatValue returns a formatted string for an arbitrary value.