summaryrefslogtreecommitdiff
path: root/helpers.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-22 06:25:31 -0500
committerJeff Carr <[email protected]>2024-10-22 06:25:31 -0500
commitd52e39025edcc8ec5bda4949a9dd65ce6499b870 (patch)
tree7b0fa9d4fa1af16b57318bc4c0a5208fe318da7d /helpers.go
parented7dd145f607edb60df43f457e7e0013f4647aba (diff)
don't actually use prototext?
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'helpers.go')
-rw-r--r--helpers.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/helpers.go b/helpers.go
index 5549358..00ca6cf 100644
--- a/helpers.go
+++ b/helpers.go
@@ -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)
+}