don't actually use prototext?
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
ed7dd145f6
commit
d52e39025e
11
helpers.go
11
helpers.go
|
@ -24,10 +24,13 @@ func (c *Cluster) FormatJSON() string {
|
||||||
return protojson.Format(c)
|
return protojson.Format(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cluster) FormatTEXT() string {
|
|
||||||
return prototext.Format(c)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Cluster) UnmarshalJSON(data []byte) error {
|
func (c *Cluster) UnmarshalJSON(data []byte) error {
|
||||||
return protojson.Unmarshal(data, c)
|
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)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue