summaryrefslogtreecommitdiff
path: root/helpers.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-24 16:57:50 -0500
committerJeff Carr <[email protected]>2024-10-24 16:57:50 -0500
commit87b7bc17b313c04806981408943923d8e66f960a (patch)
tree2124e618a2dd06fc0aefa6b4a3a1d449e504bf8a /helpers.go
parentdac27e31b5cdf7f9aa382cd342dcfa79423a0f69 (diff)
seperate config files for droplets, hypervisors & events
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'helpers.go')
-rw-r--r--helpers.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/helpers.go b/helpers.go
index 8df7040..eb54261 100644
--- a/helpers.go
+++ b/helpers.go
@@ -4,8 +4,6 @@ import (
"fmt"
"github.com/google/uuid"
- "google.golang.org/protobuf/encoding/protojson"
- "google.golang.org/protobuf/encoding/prototext"
)
// can the json protobuf output use a string and have a type handler
@@ -27,6 +25,7 @@ func (x *Hypervisor) GetMemoryPrintable() string {
return fmt.Sprintf("%d GB", i)
}
+/*
func (c *Cluster) MarshalJSON() ([]byte, error) {
return protojson.Marshal(c)
}
@@ -38,10 +37,12 @@ func (c *Cluster) FormatJSON() string {
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)
}
@@ -49,6 +50,7 @@ func (c *Cluster) FormatTEXT() string {
func (d *Droplets) FormatTEXT() string {
return prototext.Format(d)
}
+*/
func (c *Cluster) FindDroplet(name string) *Droplet {
for _, d := range c.Droplets {