Skip to content

Commit cf35c28

Browse files
author
Cameron Wright
committed
fixing lint errors
1 parent 61199d0 commit cf35c28

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

controllers/tests/suite_test.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -303,22 +303,22 @@ func GetNodePort(portAmount int32) int32 {
303303
for attempts = 0; attempts < 100; attempts++ {
304304
port := minPort + rand.Int31n(int32(portRange))
305305

306-
allAvailable := true
307-
for i := int32(0); i <= portAmount; i++ {
308-
if nodePorts[port+i] {
309-
allAvailable = false
310-
break
311-
}
312-
}
313-
314-
if allAvailable {
315-
for i := int32(0); i <= portAmount; i++ {
316-
nodePorts[port+i] = true
317-
}
318-
fmt.Printf("GetNodePort: Successfully allocated NodePort range %d-%d after %d attempts\n",
319-
port, port+portAmount, attempts+1)
320-
return port
321-
}
306+
allAvailable := true
307+
for i := int32(0); i <= portAmount; i++ {
308+
if nodePorts[port+i] {
309+
allAvailable = false
310+
break
311+
}
312+
}
313+
314+
if allAvailable {
315+
for i := int32(0); i <= portAmount; i++ {
316+
nodePorts[port+i] = true
317+
}
318+
fmt.Printf("GetNodePort: Successfully allocated NodePort range %d-%d after %d attempts\n",
319+
port, port+portAmount, attempts+1)
320+
return port
321+
}
322322
}
323323

324324
fmt.Printf("WARNING: No free NodePorts found after %d attempts, returning 0 for auto-assignment\n", attempts)

0 commit comments

Comments
 (0)