From eadb6386b182b8e0c6c54a79df64690ed4f8a5bb Mon Sep 17 00:00:00 2001 From: Mike Rostermund Date: Thu, 26 Sep 2024 15:32:40 +0200 Subject: [PATCH] staticcheck --- images/helper/main.go | 2 +- pkg/kubernetes/nodes.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/helper/main.go b/images/helper/main.go index 791188e43..02aaf3a7a 100644 --- a/images/helper/main.go +++ b/images/helper/main.go @@ -73,7 +73,7 @@ func initMode() { } else { zone, found := node.Labels[corev1.LabelZoneFailureDomainStable] if !found { - zone, _ = node.Labels[corev1.LabelZoneFailureDomain] + zone = node.Labels[corev1.LabelZoneFailureDomain] } err := os.WriteFile(targetFile, []byte(zone), 0644) // #nosec G306 if err != nil { diff --git a/pkg/kubernetes/nodes.go b/pkg/kubernetes/nodes.go index 6036ea0c7..57041c9cb 100644 --- a/pkg/kubernetes/nodes.go +++ b/pkg/kubernetes/nodes.go @@ -31,7 +31,7 @@ func GetZoneForNodeName(ctx context.Context, c client.Client, nodeName string) ( } zone, found := node.Labels[corev1.LabelZoneFailureDomainStable] if !found { - zone, _ = node.Labels[corev1.LabelZoneFailureDomain] + zone = node.Labels[corev1.LabelZoneFailureDomain] } nodeNameToZoneName[nodeName] = zone