Skip to content

Commit 4aca735

Browse files
committed
More linter corrections
1 parent e8b2fc1 commit 4aca735

4 files changed

Lines changed: 8 additions & 6 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/node_certificate_controller.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ import (
3535
logger "sigs.k8s.io/controller-runtime/pkg/log"
3636
)
3737

38-
const ()
39-
4038
type NodeCertificateController struct {
4139
k8sclient.Client
4240
Scheme *runtime.Scheme

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (r *TraitsController) Reconcile(ctx context.Context, req ctrl.Request) (ctr
9191
}
9292
}
9393

94-
for item, _ := range toAdd {
94+
for item := range toAdd {
9595
targetTraitsSet[item] = true
9696
}
9797

@@ -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)