Skip to content

Commit d678438

Browse files
committed
style: fix linting issues on ensurePortsCoherence
1 parent f8c9b8a commit d678438

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

pkg/liqo-controller-manager/networking/external-network/client-operator/client_controller.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,20 +301,16 @@ func (r *ClientReconciler) SetupWithManager(mgr ctrl.Manager) error {
301301
}
302302

303303
func (r *ClientReconciler) ensurePortsCoherence(ctx context.Context, gw *networkingv1beta1.GatewayClient) (bool, error) {
304-
305304
if len(gw.Spec.Endpoint.Ports) > 0 && gw.Spec.Endpoint.Port == gw.Spec.Endpoint.Ports[0] {
306305
return false, nil
307306
}
308307

309308
switch {
310309
case gw.Spec.Endpoint.Port != 0 && len(gw.Spec.Endpoint.Ports) == 0:
311-
312310
gw.Spec.Endpoint.Ports = []int32{gw.Spec.Endpoint.Port}
313311
case len(gw.Spec.Endpoint.Ports) > 0:
314-
315312
gw.Spec.Endpoint.Port = gw.Spec.Endpoint.Ports[0]
316313
default:
317-
318314
gw.Spec.Endpoint.Port = int32(forge.DefaultGwServerPort)
319315
gw.Spec.Endpoint.Ports = []int32{forge.DefaultGwServerPort}
320316
}

0 commit comments

Comments
 (0)