Skip to content

Commit f17e707

Browse files
committed
[golangci-lint] fmt.Sprintf can be replaced with string concatenation
1 parent 96dff8a commit f17e707

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

internal/controller/eviction_controller.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,10 @@ func (r *EvictionReconciler) enableHypervisorService(ctx context.Context, evicti
436436

437437
if hypervisor.Service.DisabledReason != r.evictionReason(eviction) {
438438
changed := meta.SetStatusCondition(&eviction.Status.Conditions, metav1.Condition{
439-
Type: kvmv1.ConditionTypeHypervisorReEnabled,
440-
Status: metav1.ConditionTrue,
441-
Message: fmt.Sprintf("Hypervisor already re-enabled for reason: %s",
442-
hypervisor.Service.DisabledReason),
443-
Reason: kvmv1.ConditionReasonSucceeded,
439+
Type: kvmv1.ConditionTypeHypervisorReEnabled,
440+
Status: metav1.ConditionTrue,
441+
Message: "Hypervisor already re-enabled for reason:" + hypervisor.Service.DisabledReason,
442+
Reason: kvmv1.ConditionReasonSucceeded,
444443
})
445444
if changed {
446445
return r.Status().Update(ctx, eviction)

internal/controller/node_certificate_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ type NodeCertificateController struct {
4848
}
4949

5050
func getSecretAndCertName(name string) (secretName, certName string) {
51-
certName = fmt.Sprintf("libvirt-%s", name)
52-
secretName = fmt.Sprintf("tls-%s", certName)
51+
certName = "libvirt-" + name
52+
secretName = "tls-" + certName
5353
return secretName, certName
5454
}
5555

0 commit comments

Comments
 (0)