diff --git a/cmd/karma/alerts.go b/cmd/karma/alerts.go index 4e79991db..f16999402 100644 --- a/cmd/karma/alerts.go +++ b/cmd/karma/alerts.go @@ -35,11 +35,7 @@ func countLabel(countStore map[string]map[string]int, key string, val string) { if _, found := countStore[key]; !found { countStore[key] = make(map[string]int) } - if _, found := countStore[key][val]; found { - countStore[key][val]++ - } else { - countStore[key][val] = 1 - } + countStore[key][val]++ } func countersToLabelStats(counters map[string]map[string]int) models.LabelNameStatsList {