From 136fea956ca9c68bbf314bcab3e764a6773ec143 Mon Sep 17 00:00:00 2001 From: stuart nelson Date: Thu, 2 Nov 2017 11:25:01 +0100 Subject: [PATCH] Re-use slice when filtering resolved alerts --- notify/impl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notify/impl.go b/notify/impl.go index c6d51bea..cc5fc3d3 100644 --- a/notify/impl.go +++ b/notify/impl.go @@ -66,7 +66,7 @@ type Integration struct { // Notify implements the Notifier interface. 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 // to end up unfiltered in the SetNotifiesStage.