From 028632de277704fe4576e732d4997daa70f25f60 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Wed, 15 Jun 2022 00:08:39 +0530 Subject: added color coding and error handling + other visual appeal --- mal/search.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mal') diff --git a/mal/search.go b/mal/search.go index d667edb..2968611 100644 --- a/mal/search.go +++ b/mal/search.go @@ -23,10 +23,14 @@ import ( a "github.com/MikunoNaka/MAL2Go/anime" ) -func SearchAnime(searchString string) []a.Anime { +func SearchAnime(searchString string, extraFields []string) []a.Anime { // TODO: load limit, offset and (maybe) fields from config limit, offset := 10, 0 + fields := []string{"title", "id"} + for _, i := range extraFields { + fields = append(fields, i) + } res, err := animeClient.SearchAnime(searchString, limit, offset, fields) if err != nil { -- cgit v1.2.3