From 4452a20ca0ea1a25a874cccdb0a1eddb4670eb88 Mon Sep 17 00:00:00 2001 From: Oleksand Matviienko Date: Sun, 29 Sep 2024 15:06:29 +0200 Subject: [PATCH] refactor: Renamed variable in feedGroupsExistsInMap --- operator/internal/controller/handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operator/internal/controller/handlers.go b/operator/internal/controller/handlers.go index 05e6485..8f72d0a 100644 --- a/operator/internal/controller/handlers.go +++ b/operator/internal/controller/handlers.go @@ -165,8 +165,8 @@ func (r *ConfigMapHandler) validateConfigMapFeeds(ctx context.Context, obj clien // feedGroupsExistsInMap returns true if hotNews contains feedGroups which exists in configMap func (r *ConfigMapHandler) feedGroupsExistsInMap(hotNews newsaggregatorv1.HotNews, configMap *v1.ConfigMap) bool { - for _, feedGroupValues := range configMap.Data { - if slices.Contains(hotNews.Spec.FeedGroups, feedGroupValues) { + for feedGroupName, _ := range configMap.Data { + if slices.Contains(hotNews.Spec.FeedGroups, feedGroupName) { return true } }