From fff3dadabc321871e6819392efc605c6dffe2e69 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 15 Aug 2023 10:57:27 +0530 Subject: migrated from MAL2Go to mg package --- mal/mal.go | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'mal/mal.go') diff --git a/mal/mal.go b/mal/mal.go index 69cb1f1..ce25d22 100644 --- a/mal/mal.go +++ b/mal/mal.go @@ -19,23 +19,15 @@ along with this program. If not, see . package mal import ( - "github.com/MikunoNaka/macli/auth" - a "github.com/MikunoNaka/MAL2Go/v4/anime" - m "github.com/MikunoNaka/MAL2Go/v4/manga" - u "github.com/MikunoNaka/MAL2Go/v4/user" - ua "github.com/MikunoNaka/MAL2Go/v4/user/anime" - um "github.com/MikunoNaka/MAL2Go/v4/user/manga" + "vidhukant.com/macli/auth" + "vidhukant.com/mg" "github.com/spf13/viper" "strings" ) var ( Secret string - animeClient a.Client - mangaClient m.Client - userClient u.Client - userAnimeClient ua.Client - userMangaClient um.Client + MALClient mg.Client SearchLength, SearchOffset int SearchNSFW bool @@ -52,10 +44,5 @@ func Init() { } tk := "Bearer " + strings.TrimSpace(Secret) - // initialise MAL2Go Client(s) - animeClient.AuthToken = tk - mangaClient.AuthToken = tk - userClient.AuthToken = tk - userAnimeClient.AuthToken = tk - userMangaClient.AuthToken = tk + MALClient.MainAuth = tk } -- cgit v1.2.3