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()) } }