Skip to content

Commit cd21860

Browse files
committed
More linter corrections
1 parent e8b2fc1 commit cd21860

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

internal/controller/aggregates_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ func (r *AggregatesController) Reconcile(ctx context.Context, req ctrl.Request)
8989

9090
if len(toRemove) > 0 {
9191
log.Info("Removing", "aggregates", toRemove)
92-
for item, _ := range toRemove {
92+
for item := range toRemove {
9393
err = removeFromAggregate(ctx, r.computeClient, aggs, computeHost, item)
9494
if err != nil {
9595
return ctrl.Result{}, err
9696
}
9797
}
9898
}
9999

100-
_, err = setNodeAnnotations(ctx, r.Client, node, map[string]string{annotationAggregatesApplied: node.Annotations[annotationAggregates]})
100+
err = setNodeAnnotations(ctx, r.Client, node, map[string]string{annotationAggregatesApplied: node.Annotations[annotationAggregates]})
101101

102102
return ctrl.Result{}, err
103103
}

internal/controller/onboarding_controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@ func (r *OnboardingController) createOrGetTestServer(ctx context.Context, zone,
324324
}
325325

326326
imagesList, err := images.ExtractImages(imagePages)
327+
if err != nil {
328+
return nil, err
329+
}
330+
327331
for _, image := range imagesList {
328332
if image.Name == testImageName {
329333
imageRef = image.ID

internal/controller/traits_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (r *TraitsController) Reconcile(ctx context.Context, req ctrl.Request) (ctr
107107
return ctrl.Result{}, result.Err
108108
}
109109

110-
_, err = setNodeAnnotations(ctx, r.Client, node, map[string]string{annotationAppliedCustomTraits: node.Annotations[annotationCustomTraits]})
110+
err = setNodeAnnotations(ctx, r.Client, node, map[string]string{annotationAppliedCustomTraits: node.Annotations[annotationCustomTraits]})
111111

112112
return ctrl.Result{}, err
113113
}

0 commit comments

Comments
 (0)