From ab3db8a4ca89293ce0928177e8845d622f13755f Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Wed, 15 Jun 2022 12:59:22 +0530 Subject: added pretty template for TextInput --- mal/status.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'mal/status.go') diff --git a/mal/status.go b/mal/status.go index 422a838..1e11106 100644 --- a/mal/status.go +++ b/mal/status.go @@ -23,14 +23,26 @@ import ( "os" ) -func SetStatus(animeId int, status string) { +func SetAnimeStatus(animeId int, status string) { resp, err := userAnimeClient.SetStatus(animeId, status) if err != nil { fmt.Println("Error while parsing status:", err.Error()) os.Exit(1) } if resp.Error != "" { - fmt.Println("MyAnimeList reported error on SetStatus", resp.Error, resp.Message) + fmt.Println("MyAnimeList reported error on setting anime status", resp.Error, resp.Message) + os.Exit(1) + } +} + +func SetMangaStatus(mangaId int, status string) { + resp, err := userMangaClient.SetStatus(mangaId, status) + if err != nil { + fmt.Println("Error while parsing status:", err.Error()) + os.Exit(1) + } + if resp.Error != "" { + fmt.Println("MyAnimeList reported error on setting manga status", resp.Error, resp.Message) os.Exit(1) } } -- cgit v1.2.3