don't actually use prototext?

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-22 06:25:31 -05:00
parent ed7dd145f6
commit d52e39025e
1 changed files with 7 additions and 4 deletions

View File

@ -24,10 +24,13 @@ func (c *Cluster) FormatJSON() string {
return protojson.Format(c)
}
func (c *Cluster) FormatTEXT() string {
return prototext.Format(c)
}
func (c *Cluster) UnmarshalJSON(data []byte) error {
return protojson.Unmarshal(data, c)
}
// apparently this isn't supposed to be used?
// https://protobuf.dev/reference/go/faq/#unstable-text
// this is a shame because this is much nicer output than JSON Format()
func (c *Cluster) FormatTEXT() string {
return prototext.Format(c)
}