Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func (c *test[R]) testCmd(t *testing.T) {
}

for _, format := range outputFormats(c) {
format := format
t.Run(fmt.Sprintf("%v", format.Args()), func(t *testing.T) {
_, out, config := c.newMockConfig(t)

Expand Down
4 changes: 0 additions & 4 deletions cmd/completion/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ func (c *Completion) IssueTypeCompletion(cmd *cobra.Command, args []string, toCo
}
var names []string
for _, issue := range resp.Payload {
issue := issue

if issue.ID == nil {
continue
}
Expand All @@ -119,8 +117,6 @@ func (c *Completion) IssueSeverityCompletion(cmd *cobra.Command, args []string,

severities := map[string]bool{}
for _, issue := range resp.Payload {
issue := issue

if issue.Severity == nil {
continue
}
Expand Down
1 change: 0 additions & 1 deletion cmd/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ func (c *machineCmd) listCmdFlags(cmd *cobra.Command, lastEventErrorThresholdDef
cmd.Flags().String("network-ips", "", "network ips to filter [optional]")

for _, c := range listFlagCompletions {
c := c
genericcli.Must(cmd.RegisterFlagCompletionFunc(c.flagName, c.f))
}

Expand Down
1 change: 0 additions & 1 deletion cmd/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ func (c *partitionCmd) partitionCapacity() error {
}

for _, pc := range resp.Payload {
pc := pc
sort.SliceStable(pc.Servers, func(i, j int) bool {
return pointer.SafeDeref(pointer.SafeDeref(pc.Servers[i]).Size) < pointer.SafeDeref(pointer.SafeDeref(pc.Servers[j]).Size)
})
Expand Down
2 changes: 0 additions & 2 deletions cmd/switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,6 @@ func (c *switchCmd) switchMachines() error {

ms := map[string]*models.V1MachineIPMIResponse{}
for _, m := range machines {
m := m

if m.ID == nil {
continue
}
Expand Down
4 changes: 0 additions & 4 deletions cmd/tableprinters/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,6 @@ func (t *TablePrinter) MachineIssuesTable(data *MachinesAndIssues, wide bool) ([

machinesByID := map[string]*models.V1MachineIPMIResponse{}
for _, m := range data.Machines {
m := m

if m.ID == nil {
continue
}
Expand All @@ -322,8 +320,6 @@ func (t *TablePrinter) MachineIssuesTable(data *MachinesAndIssues, wide bool) ([

issuesByID := map[string]*models.V1MachineIssue{}
for _, issue := range data.Issues {
issue := issue

if issue.ID == nil {
continue
}
Expand Down
2 changes: 0 additions & 2 deletions cmd/tableprinters/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ func (t *TablePrinter) PartitionCapacityTable(data []*models.V1PartitionCapacity
}

for _, pc := range data {
pc := pc

for _, c := range pc.Servers {
id := pointer.SafeDeref(c.Size)

Expand Down
4 changes: 0 additions & 4 deletions cmd/tableprinters/size.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ func (t *TablePrinter) SizeReservationTable(data []*models.V1SizeReservationResp
}

for _, d := range data {
d := d

desc := d.Description
if !wide {
desc = genericcli.TruncateEnd(d.Description, 50)
Expand Down Expand Up @@ -104,8 +102,6 @@ func (t *TablePrinter) SizeReservationUsageTable(data []*models.V1SizeReservatio
}

for _, d := range data {
d := d

row := []string{
pointer.SafeDeref(d.ID),
pointer.SafeDeref(d.Sizeid),
Expand Down
3 changes: 0 additions & 3 deletions cmd/tableprinters/switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ func (t *TablePrinter) SwitchWithConnectedMachinesTable(data *SwitchesWithMachin
filteredConns := []*models.V1SwitchConnection{}

for _, conn := range s.Connections {
conn := conn

m, ok := data.MS[conn.MachineID]
if !ok {
continue
Expand Down Expand Up @@ -298,7 +296,6 @@ func (t *TablePrinter) SwitchDetailTable(data []*SwitchDetail, wide bool) ([]str
)

for _, sw := range data {
sw := sw
filterBySwp := map[string]models.V1BGPFilter{}
for _, n := range sw.Nics {
swp := *(n.Name)
Expand Down