From 68b6e17e64e7ecba64a7ba7741d22eeb035345a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Tue, 6 Aug 2019 21:19:08 +0100 Subject: [PATCH] chore(backend): reformat code --- internal/models/alertgroup.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/models/alertgroup.go b/internal/models/alertgroup.go index 8d07ba1b7..bd8c856bd 100644 --- a/internal/models/alertgroup.go +++ b/internal/models/alertgroup.go @@ -16,11 +16,12 @@ type AlertList []Alert func (a AlertList) Len() int { return len(a) - } + func (a AlertList) Swap(i, j int) { a[i], a[j] = a[j], a[i] } + func (a AlertList) Less(i, j int) bool { // compare timestamps, if equal compare fingerprints to stable sort order if a[i].StartsAt.After(a[j].StartsAt) {