summaryrefslogtreecommitdiff
path: root/sampleData.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-22 02:51:45 -0500
committerJeff Carr <[email protected]>2024-10-22 02:51:45 -0500
commitbcc97a550a70305f9182b452ef650789c2fa2b45 (patch)
treea8d4460d4f94fcb5615719b3b4373c4f93d17e77 /sampleData.go
parentec178de1d7b9cd94bdd6ffd6a64b914bae15a549 (diff)
is this how to support multiple droplets?
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'sampleData.go')
-rw-r--r--sampleData.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/sampleData.go b/sampleData.go
index b75970b..c910200 100644
--- a/sampleData.go
+++ b/sampleData.go
@@ -18,9 +18,9 @@ func CreateSampleDroplet() *Droplet {
return e
}
-func CreateSampleDroplets(total int) []Droplet {
-
- var all []Droplet
+func CreateSampleCluster(total int) *Cluster {
+ var c *Cluster
+ c = new(Cluster)
for i := 0; i < total; i++ {
d := CreateSampleDroplet()
@@ -28,8 +28,8 @@ func CreateSampleDroplets(total int) []Droplet {
// e.Id += 1000 + int32(i)
d.Comment = "Sample Droplet " + string(i)
- all = append(all, *d)
+ c.Droplets = append(c.Droplets, d)
}
- return all
+ return c
}