Re-use slice when filtering resolved alerts

This commit is contained in:
stuart nelson 2017-11-02 11:25:01 +01:00
parent b0aab04906
commit 136fea956c
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ type Integration struct {
// Notify implements the Notifier interface. // Notify implements the Notifier interface.
func (i *Integration) Notify(ctx context.Context, alerts ...*types.Alert) (bool, error) { func (i *Integration) Notify(ctx context.Context, alerts ...*types.Alert) (bool, error) {
var res []*types.Alert res := alerts[:0]
// Resolved alerts have to be filtered only at this point, because they need // Resolved alerts have to be filtered only at this point, because they need
// to end up unfiltered in the SetNotifiesStage. // to end up unfiltered in the SetNotifiesStage.