rename FindDroplet() -> FindDropletByName()
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
67cb013c83
commit
e58f78eb2d
4
add.go
4
add.go
|
@ -36,7 +36,7 @@ func (all *Droplets) FindDroplet(name string) *Droplet {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (c *Cluster) FindDroplet(name string) *Droplet {
|
||||
func (c *Cluster) FindDropletByName(name string) *Droplet {
|
||||
for _, d := range c.Droplets {
|
||||
if d.Hostname == name {
|
||||
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 {
|
||||
d := c.FindDroplet(hostname)
|
||||
d := c.FindDropletByName(hostname)
|
||||
if d != nil {
|
||||
return d
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue