mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
fix(style): simplify group appends
This commit is contained in:
@@ -134,9 +134,7 @@ func (m AlertMapper) Decode(source io.ReadCloser) ([]models.AlertGroup, error) {
|
||||
}
|
||||
}
|
||||
for _, rcv := range receivers {
|
||||
for _, ag := range rcv.Groups {
|
||||
groups = append(groups, ag)
|
||||
}
|
||||
groups = append(groups, rcv.Groups...)
|
||||
}
|
||||
return groups, nil
|
||||
}
|
||||
|
||||
@@ -133,9 +133,7 @@ func (m AlertMapper) Decode(source io.ReadCloser) ([]models.AlertGroup, error) {
|
||||
}
|
||||
}
|
||||
for _, rcv := range receivers {
|
||||
for _, ag := range rcv.Groups {
|
||||
groups = append(groups, ag)
|
||||
}
|
||||
groups = append(groups, rcv.Groups...)
|
||||
}
|
||||
return groups, nil
|
||||
}
|
||||
|
||||
@@ -132,9 +132,7 @@ func (m AlertMapper) Decode(source io.ReadCloser) ([]models.AlertGroup, error) {
|
||||
}
|
||||
}
|
||||
for _, rcv := range receivers {
|
||||
for _, ag := range rcv.Groups {
|
||||
groups = append(groups, ag)
|
||||
}
|
||||
groups = append(groups, rcv.Groups...)
|
||||
}
|
||||
return groups, nil
|
||||
}
|
||||
|
||||
@@ -136,9 +136,7 @@ func (m AlertMapper) Decode(source io.ReadCloser) ([]models.AlertGroup, error) {
|
||||
}
|
||||
}
|
||||
for _, rcv := range receivers {
|
||||
for _, ag := range rcv.Groups {
|
||||
groups = append(groups, ag)
|
||||
}
|
||||
groups = append(groups, rcv.Groups...)
|
||||
}
|
||||
return groups, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user