Skip to content

Commit

Permalink
fix codespell action error "indx ==> index"
Browse files Browse the repository at this point in the history
Signed-off-by: Nitin Goyal <[email protected]>
  • Loading branch information
iamniting authored and openshift-cherrypick-robot committed Jan 23, 2025
1 parent 3a27363 commit dd2cbc1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions controllers/storagecluster/external_resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,17 +230,17 @@ func assertExpectedExternalResources(t *testing.T, reconciler StorageClusterReco
// removeNamedResourceFromArray removes the first resource with 'Name' == 'name'
func removeNamedResourceFromArray(extArr []ExternalResource, name string) []ExternalResource {
extArrLen := len(extArr)
var indx int
for indx = 0; indx < extArrLen; indx++ {
extRsrc := extArr[indx]
var i int
for i = 0; i < extArrLen; i++ {
extRsrc := extArr[i]
if extRsrc.Name == name {
break
}
}
var newExtArr []ExternalResource
newExtArr = append(newExtArr, extArr[:indx]...)
if indx < extArrLen {
newExtArr = append(newExtArr, extArr[indx+1:]...)
newExtArr = append(newExtArr, extArr[:i]...)
if i < extArrLen {
newExtArr = append(newExtArr, extArr[i+1:]...)
}
return newExtArr
}
Expand Down

0 comments on commit dd2cbc1

Please sign in to comment.