diff options
author | Vidhu Kant Sharma <vidhukant@protonmail.ch> | 2022-06-15 00:08:39 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@protonmail.ch> | 2022-06-15 00:08:39 +0530 |
commit | 028632de277704fe4576e732d4997daa70f25f60 (patch) | |
tree | 343137fc2b19cb7c9568324a9529218ca6065e49 /mal/search.go | |
parent | 5ac21806f34a7c88d2685420d53cbd585f4b4f3d (diff) |
added color coding and error handling + other visual appeal
Diffstat (limited to 'mal/search.go')
-rw-r--r-- | mal/search.go | 6 |
1 files changed, 5 insertions, 1 deletions
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 { |