From f05ef9afbd0cd143fb08c3a02296292060c3cc4b Mon Sep 17 00:00:00 2001 From: Jack Delahunt <45426048+jackdelahunt@users.noreply.github.com> Date: Tue, 21 Feb 2023 09:31:59 +0000 Subject: [PATCH] fix: lint error on copying in range loop --- pkg/cmd/connector/connectorcmdutil/types_util.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/connector/connectorcmdutil/types_util.go b/pkg/cmd/connector/connectorcmdutil/types_util.go index a5c59cf11..5079d3b0d 100644 --- a/pkg/cmd/connector/connectorcmdutil/types_util.go +++ b/pkg/cmd/connector/connectorcmdutil/types_util.go @@ -84,9 +84,9 @@ func FilterValidTypesArgs(f *factory.Factory, toComplete string) ([]string, cobr } items := types.GetItems() - for _, connector_type := range items { - if strings.HasPrefix(connector_type.GetId(), toComplete) { - validTypes = append(validTypes, connector_type.GetId()) + for i := 0; i < len(items); i++ { + if strings.HasPrefix(items[i].GetId(), toComplete) { + validTypes = append(validTypes, items[i].GetId()) } }