From bcc97a550a70305f9182b452ef650789c2fa2b45 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 22 Oct 2024 02:51:45 -0500 Subject: is this how to support multiple droplets? Signed-off-by: Jeff Carr --- sampleData.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sampleData.go') 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 } -- cgit v1.2.3