Skip to content

Commit

Permalink
Update api/v1alpha1/freight_helpers_test.go
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>

Co-authored-by: Hidde Beydals <hiddeco@users.noreply.github.com>
  • Loading branch information
krancour and hiddeco committed Jan 10, 2025
1 parent efcd497 commit 79729d8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions api/v1alpha1/freight_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ func freightByCurrentStagesIndexer(obj client.Object) []string {
if !ok {
return nil
}
currentStages := make([]string, len(freight.Status.CurrentlyIn))
var i int
currentStages := make([]string, 0, len(freight.Status.CurrentlyIn))
for stage := range freight.Status.CurrentlyIn {
currentStages[i] = stage
i++
currentStages = append(currentStages, stage)
}
return currentStages
}
Expand Down

0 comments on commit 79729d8

Please sign in to comment.