From b0fcce16ea2e1b279320c97ba6eda1c2c7c455b2 Mon Sep 17 00:00:00 2001 From: Kristof Gyuracz Date: Thu, 1 Feb 2024 14:19:38 +0100 Subject: [PATCH] Revert "remove unnecessary variable" This reverts commit 71834f82c4b2254979aa9741653188e9295ed6bc. --- internal/controller/telemetry/collector_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/controller/telemetry/collector_controller.go b/internal/controller/telemetry/collector_controller.go index f2a2c374..cf4900dd 100644 --- a/internal/controller/telemetry/collector_controller.go +++ b/internal/controller/telemetry/collector_controller.go @@ -712,7 +712,7 @@ func normalizeNamespaceSlice(inputList []apiv1.Namespace) []apiv1.Namespace { allKeys := make(map[string]bool) uniqueList := []apiv1.Namespace{} for _, item := range inputList { - if allKeys[item.Name] { + if _, value := allKeys[item.Name]; !value { allKeys[item.Name] = true uniqueList = append(uniqueList, item) }