From ffaf3703429cc0ecd67f1af485f9dd5b402761fa Mon Sep 17 00:00:00 2001 From: FM1337 Date: Fri, 23 Jun 2017 19:23:09 -0300 Subject: [PATCH] changes made --- jobs/popular-anime/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jobs/popular-anime/main.go b/jobs/popular-anime/main.go index ec003b54..05eb5f55 100644 --- a/jobs/popular-anime/main.go +++ b/jobs/popular-anime/main.go @@ -7,6 +7,9 @@ import ( "github.com/fatih/color" ) + +const maxPopularAnime = 10 + // Note this is using the airing-anime as a template with modfications // made to it. func main() { @@ -29,8 +32,9 @@ func main() { sort.Slice(animeList, func(i, j int) bool { return animeList[i].Rating.Overall > animeList[j].Rating.Overall }) + // Change size of anime list to 10 - animeList = animeList[:10] + animeList = animeList[:maxPopularAnime] // Convert to small anime list cache := &arn.ListOfIDs{}