aboutsummaryrefslogtreecommitdiff
path: root/manga/manga.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@protonmail.ch>2022-03-06 00:51:36 +0530
committerVidhu Kant Sharma <vidhukant@protonmail.ch>2022-03-06 00:51:36 +0530
commitb6f42d806d0e0f5e59c7615cd1558e75c5b314f1 (patch)
treec9c014759f62c44520be305a60546d08140876f4 /manga/manga.go
parent95b8ab702708538ccaf26efd141b448148ac6d6d (diff)
Exported all the errors so programs using this library can customize error messages.
Diffstat (limited to 'manga/manga.go')
-rw-r--r--manga/manga.go3
1 files changed, 1 insertions, 2 deletions
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(