From 7f3ee1257e6cebd9a681061148847b9a524a13ac Mon Sep 17 00:00:00 2001 From: Nitin Goyal Date: Thu, 23 Jan 2025 10:53:23 +0530 Subject: [PATCH] fix codespell action error "indx ==> index" Signed-off-by: Nitin Goyal --- .../storagecluster/external_resources_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/controllers/storagecluster/external_resources_test.go b/controllers/storagecluster/external_resources_test.go index 5cbf9755f9..a972534c7a 100644 --- a/controllers/storagecluster/external_resources_test.go +++ b/controllers/storagecluster/external_resources_test.go @@ -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 }