Skip to content

Commit

Permalink
[Chore] make err as local variable in if-statement
Browse files Browse the repository at this point in the history
Signed-off-by: fscnick <[email protected]>
  • Loading branch information
fscnick committed Jan 7, 2025
1 parent a7197c5 commit a92c220
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ray-operator/controllers/ray/raycluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,7 @@ func (r *RayClusterReconciler) reconcileRouteOpenShift(ctx context.Context, inst
return err
}

err = r.createHeadRoute(ctx, route, instance)
if err != nil {
if err := r.createHeadRoute(ctx, route, instance); err != nil {
return err
}
}
Expand Down Expand Up @@ -533,8 +532,7 @@ func (r *RayClusterReconciler) reconcileIngressKubernetes(ctx context.Context, i
return err
}

err = r.createHeadIngress(ctx, ingress, instance)
if err != nil {
if err := r.createHeadIngress(ctx, ingress, instance); err != nil {
return err
}
}
Expand Down

0 comments on commit a92c220

Please sign in to comment.