Skip to content

Commit

Permalink
Address intrange linter violations
Browse files Browse the repository at this point in the history
"for loop can be changed to use an integer range"

Signed-off-by: Tom Pantelis <[email protected]>
  • Loading branch information
tpantelis committed Dec 4, 2024
1 parent 7bf33c9 commit 099851b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/ocp/machinesets.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ func (msd *k8sMachineSetDeployer) List() ([]unstructured.Unstructured, error) {
func RemoveDuplicates(machineSets []unstructured.Unstructured, gwNodes []v1.Node) []v1.Node {
var resultNode []v1.Node

for i := 0; i < len(gwNodes); i++ {
for i := range gwNodes {
addToResult := true

for i := 0; i < len(machineSets); i++ {
if strings.Contains(gwNodes[i].GetName(), machineSets[i].GetName()) {
for j := range machineSets {
if strings.Contains(gwNodes[i].GetName(), machineSets[j].GetName()) {
addToResult = false
break
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/rhos/ocpgwdeployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (d *ocpGatewayDeployer) deployGWNode(gatewayCount int,
func (d *ocpGatewayDeployer) deployDedicatedGWNode(gatewayNodesToDeploy int, useInternalSG bool,
status reporter.Interface,
) error {
for i := 0; i < gatewayNodesToDeploy; i++ {
for i := range gatewayNodesToDeploy {
gwNodeName := d.InfraID + "-submariner-gw" + strconv.Itoa(i)
status.Start("Deploying dedicated Submariner gateway node %s", gwNodeName)

Expand Down

0 comments on commit 099851b

Please sign in to comment.