Skip to content

Commit

Permalink
Fix rangeValCopy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrique Santos committed Nov 21, 2023
1 parent 3554dc1 commit e7b0e1b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
5 changes: 3 additions & 2 deletions internal/cmd/dns/record-set/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 3 additions & 2 deletions internal/cmd/dns/zone/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/postgresql/credential/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ var Cmd = &cobra.Command{
// Show output as table
table := tables.NewTable()
table.SetHeader("ID")
for _, i := range credentials {
table.AddRow(*i.Id)
for _, c := range credentials {
table.AddRow(*c.Id)
}
table.Render(cmd)

Expand Down
5 changes: 3 additions & 2 deletions internal/cmd/postgresql/instance/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 4 additions & 2 deletions internal/cmd/postgresql/offerings/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 3 additions & 2 deletions internal/cmd/ske/cluster/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit e7b0e1b

Please sign in to comment.