diff --git a/internal/cmd/dns/record-set/list/list.go b/internal/cmd/dns/record-set/list/list.go index 03def65b..bd4662cb 100644 --- a/internal/cmd/dns/record-set/list/list.go +++ b/internal/cmd/dns/record-set/list/list.go @@ -65,8 +65,9 @@ var Cmd = &cobra.Command{ // Show output as table table := tables.NewTable() table.SetHeader("ID", "Name", "Type", "State") - for _, recordSet := range recordSets { - table.AddRow(*recordSet.Id, *recordSet.Name, *recordSet.Type, *recordSet.State) + for i := range recordSets { + rs := recordSets[i] + table.AddRow(*rs.Id, *rs.Name, *rs.Type, *rs.State) } table.Render(cmd) diff --git a/internal/cmd/dns/zone/list/list.go b/internal/cmd/dns/zone/list/list.go index bddd3549..08d10a3d 100644 --- a/internal/cmd/dns/zone/list/list.go +++ b/internal/cmd/dns/zone/list/list.go @@ -63,8 +63,9 @@ var Cmd = &cobra.Command{ // Show output as table table := tables.NewTable() table.SetHeader("ID", "NAME", "DNS_NAME", "STATE") - for _, zone := range zones { - table.AddRow(*zone.Id, *zone.Name, *zone.DnsName, *zone.State) + for i := range zones { + z := zones[i] + table.AddRow(*z.Id, *z.Name, *z.DnsName, *z.State) } table.Render(cmd) diff --git a/internal/cmd/postgresql/credential/list/list.go b/internal/cmd/postgresql/credential/list/list.go index 21972915..7c0db5ca 100644 --- a/internal/cmd/postgresql/credential/list/list.go +++ b/internal/cmd/postgresql/credential/list/list.go @@ -58,8 +58,9 @@ var Cmd = &cobra.Command{ // Show output as table table := tables.NewTable() table.SetHeader("ID") - for _, i := range credentials { - table.AddRow(*i.Id) + for i := range credentials { + c := credentials[i] + table.AddRow(*c.Id) } table.Render(cmd) diff --git a/internal/cmd/postgresql/instance/list/list.go b/internal/cmd/postgresql/instance/list/list.go index e11dd0ed..4482e139 100644 --- a/internal/cmd/postgresql/instance/list/list.go +++ b/internal/cmd/postgresql/instance/list/list.go @@ -50,8 +50,9 @@ var Cmd = &cobra.Command{ // Show output as table table := tables.NewTable() table.SetHeader("ID", "NAME", "LAST_OPERATION.TYPE", "LAST_OPERATION.STATE") - for _, i := range instances { - table.AddRow(*i.InstanceId, *i.Name, *i.LastOperation.Type, *i.LastOperation.State) + for i := range instances { + instance := instances[i] + table.AddRow(*instance.InstanceId, *instance.Name, *instance.LastOperation.Type, *instance.LastOperation.State) } table.Render(cmd) diff --git a/internal/cmd/postgresql/offerings/list/list.go b/internal/cmd/postgresql/offerings/list/list.go index 7334090c..a7442155 100644 --- a/internal/cmd/postgresql/offerings/list/list.go +++ b/internal/cmd/postgresql/offerings/list/list.go @@ -46,8 +46,10 @@ var Cmd = &cobra.Command{ // Show output as table table := tables.NewTable() table.SetHeader("NAME", "PLAN.ID", "PLAN.NAME", "PLAN.DESCRIPTION") - for _, o := range offerings { - for _, p := range *o.Plans { + for i := range offerings { + o := offerings[i] + for j := range *o.Plans { + p := (*o.Plans)[j] table.AddRow(*o.Name, *p.Id, *p.Name, *p.Description) } table.AddSeparator() diff --git a/internal/cmd/ske/cluster/list/list.go b/internal/cmd/ske/cluster/list/list.go index 9dac0ac9..891c69ef 100644 --- a/internal/cmd/ske/cluster/list/list.go +++ b/internal/cmd/ske/cluster/list/list.go @@ -54,8 +54,9 @@ var Cmd = &cobra.Command{ // Show output as table table := tables.NewTable() table.SetHeader("NAME", "STATE") - for _, cluster := range clusters { - table.AddRow(*cluster.Name, *cluster.Status.Aggregated) + for i := range clusters { + c := clusters[i] + table.AddRow(*c.Name, *c.Status.Aggregated) } table.Render(cmd)