diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-06-29 23:46:53 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-06-29 23:46:53 +0530 |
commit | 1395d849470cc564d593bd2074a69f012e4f70ce (patch) | |
tree | c14d064e86122add55340051f98c145b882d4878 /mal/delete.go | |
parent | ccb1cf8c1679d5e8a401a85151ef9882e4293b81 (diff) |
migrated from MAL2Go v1 to v2
Diffstat (limited to 'mal/delete.go')
-rw-r--r-- | mal/delete.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mal/delete.go b/mal/delete.go index 27ffbe6..863e9f3 100644 --- a/mal/delete.go +++ b/mal/delete.go @@ -21,19 +21,25 @@ package mal import ( "fmt" // "os" - a "github.com/MikunoNaka/MAL2Go/anime" - m "github.com/MikunoNaka/MAL2Go/manga" + a "github.com/MikunoNaka/MAL2Go/v2/anime" + m "github.com/MikunoNaka/MAL2Go/v2/manga" ) func DeleteAnime(anime a.Anime) { - res := userAnimeClient.DeleteAnime(anime.Id) + res, err := userAnimeClient.DeleteAnime(anime.Id) + if err != nil { + fmt.Println("Error While Deleting " + anime.Title + ":", err) + } if res != "200" { fmt.Println("Error: MyAnimeList Returned " + res + " while deleting " + anime.Title) } } func DeleteManga(manga m.Manga) { - res := userMangaClient.DeleteManga(manga.Id) + res, err := userMangaClient.DeleteManga(manga.Id) + if err != nil { + fmt.Println("Error While Deleting " + manga.Title + ":", err) + } if res != "200" { fmt.Println("Error: MyAnimeList Returned " + res + " while deleting " + manga.Title) } |