Skip to content

Commit 981f3b7

Browse files
committed
lint
1 parent 48623ea commit 981f3b7

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

controllers/apps/component/transformer_component_status.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,15 +387,16 @@ func (t *componentStatusTransformer) reconcileWorkloadRunningCondition(transCtx
387387
message := ""
388388
comp := t.comp
389389

390-
if t.runningITS == nil {
390+
switch {
391+
case t.runningITS == nil:
391392
status = metav1.ConditionFalse
392393
reason = "WorkloadNotExist"
393394
message = "waiting for workload to be created"
394-
} else if !t.isWorkloadUpdated() {
395+
case !t.isWorkloadUpdated():
395396
status = metav1.ConditionFalse
396397
reason = "WorkloadNotUpdated"
397398
message = "observed workload's generation not matching component's"
398-
} else if !t.runningITS.IsInstanceSetReady() {
399+
case !t.runningITS.IsInstanceSetReady():
399400
status = metav1.ConditionFalse
400401
reason = "WorkloadNotReady"
401402
message = "workload not ready"

0 commit comments

Comments
 (0)