Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 0817226

Browse files
committed
chore(lint): fix lint errors
Signed-off-by: Chris Privitere <[email protected]>
1 parent 70b4b26 commit 0817226

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

internal/emlb/emlb.go

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,9 @@ func (e *EMLB) DeleteLoadBalancer(ctx context.Context, clusterScope *scope.Clust
253253
if err != nil {
254254
if resp.StatusCode == http.StatusNotFound {
255255
return nil
256-
} else {
257-
log.Error(err, "LB Delete Failed", "EMLB ID", lbID, "Response Body", resp.Body)
258-
return err
259256
}
257+
log.Error(err, "LB Delete Failed", "EMLB ID", lbID, "Response Body", resp.Body)
258+
return err
260259
}
261260

262261
return nil
@@ -281,10 +280,9 @@ func (e *EMLB) DeleteLoadBalancerOrigin(ctx context.Context, machineScope *scope
281280
if err != nil {
282281
if resp.StatusCode != http.StatusNotFound {
283282
return nil
284-
} else {
285-
log.Error(err, "LB Pool Delete Failed", "Pool ID", lbPoolID, "Response Body", resp.Body)
286-
return err
287283
}
284+
log.Error(err, "LB Pool Delete Failed", "Pool ID", lbPoolID, "Response Body", resp.Body)
285+
return err
288286
}
289287

290288
return nil
@@ -306,14 +304,6 @@ func (e *EMLB) getLoadBalancerPort(ctx context.Context, id string, portNumber in
306304
return LoadBalancerPort, err
307305
}
308306

309-
// getLoadBalancerPool Returns a Load Balancer Pool object given an id.
310-
func (e *EMLB) getLoadBalancerPool(ctx context.Context, id string) (*lbaas.LoadBalancerPool, *http.Response, error) {
311-
ctx = context.WithValue(ctx, lbaas.ContextOAuth2, e.tokenExchanger)
312-
313-
LoadBalancerPool, resp, err := e.client.PoolsApi.GetLoadBalancerPool(ctx, id).Execute()
314-
return LoadBalancerPool, resp, err
315-
}
316-
317307
// EnsureLoadBalancerOrigin takes the devices list of IP addresses in a Load Balancer Origin Pool and ensures an origin
318308
// for the first IPv4 address in the list exists.
319309
func (e *EMLB) ensureLoadBalancerOrigin(ctx context.Context, originID, poolID, lbName string, deviceAddr []corev1.NodeAddress) (*lbaas.LoadBalancerPoolOrigin, error) {

0 commit comments

Comments
 (0)