summaryrefslogtreecommitdiff
path: root/helpers.go
diff options
context:
space:
mode:
Diffstat (limited to 'helpers.go')
-rw-r--r--helpers.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/helpers.go b/helpers.go
index 4ffd13c..6660eb4 100644
--- a/helpers.go
+++ b/helpers.go
@@ -103,7 +103,17 @@ func (c *Cluster) AddDroplet(hostname string, cpus int, mem int) *Droplet {
d.Cpus = 1
}
d.Memory = SetGB(mem * 32)
- d.Testsi.Capacity = SetGB(mem * 32)
+ if d.Testsi == nil {
+ fmt.Println("Testsi is NIL")
+ fmt.Println("Testsi is NIL")
+ fmt.Println("Testsi is NIL")
+ fmt.Println("Testsi is NIL")
+ var newInfo StorageInfo
+ newInfo = StorageInfo{Capacity: 64}
+ d.Testsi = &newInfo
+ } else {
+ d.Testsi.Capacity = SetGB(mem * 32)
+ }
// d.Testsi = StorageInfo{Capacity: 64}
c.Droplets = append(c.Droplets, d)
return d