From b6f42d806d0e0f5e59c7615cd1558e75c5b314f1 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 6 Mar 2022 00:51:36 +0530 Subject: Exported all the errors so programs using this library can customize error messages. --- manga/manga.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'manga') diff --git a/manga/manga.go b/manga/manga.go index 0fd7853..f50f6e2 100644 --- a/manga/manga.go +++ b/manga/manga.go @@ -18,7 +18,6 @@ package manga import ( "encoding/json" - "errors" "fmt" "strconv" e "github.com/MikunoNaka/MAL2Go/errhandlers" @@ -115,7 +114,7 @@ func (c Client) GetMangaRanking(rankingType string, limit, offset int, fields [] // if ranking type is invalid if !e.IsValidMangaRankingType(rankingType) { - return mangaRanking, errors.New(fmt.Sprintf("GetMangaRanking: Invalid ranking type specified: \"%s\"", rankingType)) + return mangaRanking, e.InvalidRankingError } endpoint, _ := u.UrlGenerator( -- cgit v1.2.3