diff options
| author | Jeff Carr <[email protected]> | 2024-10-26 06:01:19 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-26 06:01:19 -0500 |
| commit | ade54fdedac3bf89636f914b89fd17eaa972947f (patch) | |
| tree | c1f00a440a436a3b0738b865d89a1a8c5e3a81f7 /helpers.go | |
| parent | a8484013dc62bc0750f780b04b46cd48fe85ee5b (diff) | |
events should not be plural
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'helpers.go')
| -rw-r--r-- | helpers.go | 32 |
1 files changed, 7 insertions, 25 deletions
@@ -25,32 +25,14 @@ func (x *Hypervisor) GetMemoryPrintable() string { return fmt.Sprintf("%d GB", i) } -/* -func (c *Cluster) MarshalJSON() ([]byte, error) { - return protojson.Marshal(c) -} - -func (c *Cluster) FormatJSON() string { - return protojson.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) -} - -func (d *Droplets) FormatTEXT() string { - return prototext.Format(d) +func (all *Droplets) FindDroplet(name string) *Droplet { + for _, d := range all.Droplets { + if d.Hostname == name { + return d + } + } + return nil } -*/ func (c *Cluster) FindDroplet(name string) *Droplet { for _, d := range c.Droplets { |
