mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
fix(style): simplify append code
This commit is contained in:
@@ -43,9 +43,7 @@ func DedupAlerts() []models.AlertGroup {
|
||||
// alertmanager instances to it, this way we end up with all instances
|
||||
// for each unique alert merged into a single alert with all
|
||||
// alertmanager instances attached to it
|
||||
for _, am := range alert.Alertmanager {
|
||||
a.Alertmanager = append(a.Alertmanager, am)
|
||||
}
|
||||
a.Alertmanager = append(a.Alertmanager, alert.Alertmanager...)
|
||||
// set startsAt to the earliest value we have
|
||||
if alert.StartsAt.Before(a.StartsAt) {
|
||||
a.StartsAt = alert.StartsAt
|
||||
|
||||
Reference in New Issue
Block a user