Skip to content

Commit 96dff8a

Browse files
committed
[golangci-lint] fix golint annotations
1 parent b138247 commit 96dff8a

12 files changed

+16
-16
lines changed

internal/controller/decomission_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var _ = Describe("Decommission Controller", func() {
4949
resource := &corev1.Node{
5050
ObjectMeta: metav1.ObjectMeta{
5151
Name: nodeName,
52-
Labels: map[string]string{labelEvictionRequired: "true"}, //nolint:goconst
52+
Labels: map[string]string{labelEvictionRequired: "true"},
5353
},
5454
}
5555
Expect(k8sClient.Create(ctx, resource)).To(Succeed())

internal/controller/eviction_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func (r *EvictionReconciler) evictNext(ctx context.Context, eviction *kvmv1.Evic
305305
return ctrl.Result{}, r.Status().Update(ctx, eviction)
306306
}
307307

308-
if vm.TaskState == "deleting" { // nolint:gocritic
308+
if vm.TaskState == "deleting" { //nolint:gocritic
309309
// We just have to wait for it to be gone. Try the next one.
310310
copy((*instances)[1:], (*instances)[:len(*instances)-1])
311311
(*instances)[0] = uuid

internal/controller/eviction_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ var _ = Describe("Eviction Controller", func() {
9797
fakeServer testhelper.FakeServer
9898
)
9999

100-
ctx := context.Background() // nolint:govet
100+
ctx := context.Background() //nolint:govet
101101

102102
BeforeEach(func() {
103103
By("Setting up the OpenStack http mock server")

internal/controller/hypervisor_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var _ = Describe("Hypervisor Controller", func() {
4848
resource = &corev1.Node{
4949
ObjectMeta: metav1.ObjectMeta{
5050
Name: "other-node",
51-
Labels: map[string]string{corev1.LabelTopologyZone: "test-zone"}, //nolint:goconst
51+
Labels: map[string]string{corev1.LabelTopologyZone: "test-zone"},
5252
},
5353
}
5454
})

internal/controller/maintenance_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (r *MaintenanceController) ensureSignallingDeployment(ctx context.Context,
179179
deployment.Labels = labels
180180

181181
podLabels := maps.Clone(labels)
182-
podLabels[labelCriticalComponent] = "true" //nolint:goconst
182+
podLabels[labelCriticalComponent] = "true"
183183

184184
var command []string
185185
if ready {

internal/controller/maintenance_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var _ = Describe("Maintenance Controller", func() {
4545
resource := &corev1.Node{
4646
ObjectMeta: metav1.ObjectMeta{
4747
Name: nodeName,
48-
Labels: map[string]string{labelEvictionRequired: "true"}, //nolint:goconst
48+
Labels: map[string]string{labelEvictionRequired: "true"},
4949
},
5050
}
5151
Expect(k8sClient.Create(ctx, resource)).To(Succeed())

internal/controller/node_certificate_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ var _ = Describe("Node Certificate Controller", func() {
6666
resource := &corev1.Node{
6767
ObjectMeta: metav1.ObjectMeta{
6868
Name: nodeName,
69-
Labels: map[string]string{labelHypervisor: "test"}, //nolint:goconst
69+
Labels: map[string]string{labelHypervisor: "test"},
7070
},
7171
}
7272
Expect(fakeClient.Create(ctx, resource)).To(Succeed())

internal/controller/node_eviction_label_controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (r *NodeEvictionLabelReconciler) Reconcile(ctx context.Context, req ctrl.Re
9797

9898
if !HasStatusCondition(hv.Status.Conditions, ConditionTypeOnboarding) {
9999
// Hasn't even started to onboard that node, so nothing to evict for sure
100-
value = "true" //nolint:goconst
100+
value = "true"
101101
} else {
102102
// check for existing eviction, else create it
103103
value, err = r.reconcileEviction(ctx, eviction, node, hostname, maintenanceValue)
@@ -113,7 +113,7 @@ func (r *NodeEvictionLabelReconciler) Reconcile(ctx context.Context, req ctrl.Re
113113
}
114114

115115
newNode := node.DeepCopy()
116-
if value == "true" { //nolint:goconst
116+
if value == "true" {
117117
evictAgentsLabels(newNode.Labels)
118118
}
119119
newNode.Labels[labelEvictionApproved] = maintenanceValue
@@ -153,7 +153,7 @@ func (r *NodeEvictionLabelReconciler) reconcileEviction(ctx context.Context, evi
153153
}
154154
switch evictionState {
155155
case "Succeeded":
156-
return "true", nil //nolint:goconst
156+
return "true", nil
157157
case "Failed":
158158
return "false", nil
159159
default:

internal/controller/node_eviction_label_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var _ = Describe("Node Eviction Label Controller", func() {
4949
)
5050

5151
Context("When reconciling a node", func() {
52-
ctx := context.Background() // nolint:govet
52+
ctx := context.Background() //nolint:govet
5353

5454
reconcileNodeLoop := func(steps int) (res ctrl.Result, err error) {
5555
for range steps {

internal/controller/onboarding_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var _ = Describe("Onboarding Controller", func() {
3838
Context("When reconciling a hypervisor", func() {
3939
const hypervisorName = "some-test"
4040

41-
ctx := context.Background() // nolint:govet
41+
ctx := context.Background() //nolint:govet
4242

4343
reconcileLoop := func(steps int) (res ctrl.Result, err error) {
4444
req := ctrl.Request{

0 commit comments

Comments
 (0)