mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
chore: preallocate slices where we have a good idea of requirements (#91596)
* chore: preallocate slices where we have a good idea of requirements * pr feedback
This commit is contained in:
@@ -540,7 +540,7 @@ func postPath(pre string, v config.AlertmanagerAPIVersion) string {
|
||||
// AlertmanagerFromGroup extracts a list of alertmanagers from a target group
|
||||
// and an associated AlertmanagerConfig.
|
||||
func AlertmanagerFromGroup(tg *targetgroup.Group, cfg *config.AlertmanagerConfig) ([]alertmanager, []alertmanager, error) {
|
||||
var res []alertmanager
|
||||
res := make([]alertmanager, 0, len(tg.Targets))
|
||||
var droppedAlertManagers []alertmanager
|
||||
|
||||
for _, tlset := range tg.Targets {
|
||||
|
||||
Reference in New Issue
Block a user