Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.17] fix codespell action error "indx ==> index" #2987

Merged
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
12 changes: 6 additions & 6 deletions controllers/storagecluster/external_resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,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
Loading