From 8accd83042a1aa02e638a0ed4cb452713b461591 Mon Sep 17 00:00:00 2001 From: Marvin Blum Date: Mon, 28 Sep 2020 21:48:51 +0200 Subject: [PATCH] Limit country list. --- tracking/statistics.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tracking/statistics.go b/tracking/statistics.go index 64115c8..6e3980b 100644 --- a/tracking/statistics.go +++ b/tracking/statistics.go @@ -150,6 +150,10 @@ func GetCountry(startDate, endDate time.Time) []pirsch.CountryStats { countries[i].CountryCode.String = strings.ToUpper(countries[i].CountryCode.String) } + if len(countries) > 10 { + return countries[:10] + } + return countries }