Skip to content

Commit e12a23c

Browse files
committed
Fix lint errors
1 parent d84f4f1 commit e12a23c

File tree

3 files changed

+75
-91
lines changed

3 files changed

+75
-91
lines changed

internal/controller/operator/factory/vmdistributedcluster/vmdistributedcluster.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func CreateOrUpdate(ctx context.Context, cr *vmv1alpha1.VMDistributedCluster, rc
6767
return fmt.Errorf("VMClusterRefOrSpec.Spec or VMClusterRefOrSpec.Ref must be set for zone at index %d", i)
6868
}
6969
if zone.Spec != nil && zone.Ref != nil {
70-
return fmt.Errorf("Either VMClusterRefOrSpec.Spec or VMClusterRefOrSpec.Ref must be set for zone at index %d", i)
70+
return fmt.Errorf("either VMClusterRefOrSpec.Spec or VMClusterRefOrSpec.Ref must be set for zone at index %d", i)
7171
}
7272
}
7373

@@ -418,7 +418,8 @@ func updateVMUserTargetRefs(ctx context.Context, rclient client.Client, vmUserOb
418418
}
419419
}
420420
if !alreadyPresent {
421-
newTargetRefs = append(freshVMUserObj.Spec.TargetRefs, *found.DeepCopy())
421+
newTargetRefs = append(newTargetRefs, freshVMUserObj.Spec.TargetRefs...)
422+
newTargetRefs = append(newTargetRefs, *found.DeepCopy())
422423
needsUpdate = true
423424
} else {
424425
// If already present, no update needed

0 commit comments

Comments
 (0)