rename FindDroplet() -> FindDropletByName()

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-31 06:49:05 -05:00
parent 67cb013c83
commit e58f78eb2d
1 changed files with 2 additions and 2 deletions

4
add.go
View File

@ -36,7 +36,7 @@ func (all *Droplets) FindDroplet(name string) *Droplet {
return nil return nil
} }
func (c *Cluster) FindDroplet(name string) *Droplet { func (c *Cluster) FindDropletByName(name string) *Droplet {
for _, d := range c.Droplets { for _, d := range c.Droplets {
if d.Hostname == name { if d.Hostname == name {
return d return d
@ -76,7 +76,7 @@ func (c *Cluster) AddHypervisor(hostname string, cpus int, mem int) *Hypervisor
} }
func (c *Cluster) AddDroplet(uuid string, hostname string, cpus int, mem int) *Droplet { func (c *Cluster) AddDroplet(uuid string, hostname string, cpus int, mem int) *Droplet {
d := c.FindDroplet(hostname) d := c.FindDropletByName(hostname)
if d != nil { if d != nil {
return d return d
} }