From 3b429fe70ab3004e9d613df745e62a0da9fab552 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Wed, 6 Jul 2022 22:52:29 +0530 Subject: migrating to MAL2Gov4 --- cmd/chapters.go | 2 +- cmd/episodes.go | 2 +- cmd/score.go | 4 ++-- cmd/search.go | 4 ++-- cmd/status.go | 4 ++-- go.mod | 7 +++++-- go.sum | 28 +++++++++++++++++++++------- mal/data.go | 4 ++-- mal/delete.go | 4 ++-- mal/episodes.go | 4 ++-- mal/mal.go | 10 +++++----- mal/score.go | 4 ++-- mal/search.go | 4 ++-- mal/status.go | 4 ++-- mal/user.go | 2 +- ui/actions.go | 4 ++-- ui/episodes.go | 4 ++-- ui/score.go | 4 ++-- ui/search.go | 4 ++-- ui/status.go | 4 ++-- util/print_anime.go | 2 +- util/print_manga.go | 2 +- 22 files changed, 64 insertions(+), 47 deletions(-) diff --git a/cmd/chapters.go b/cmd/chapters.go index 220953e..6fc062a 100644 --- a/cmd/chapters.go +++ b/cmd/chapters.go @@ -24,7 +24,7 @@ import ( "strings" "github.com/MikunoNaka/macli/ui" "github.com/MikunoNaka/macli/mal" - m "github.com/MikunoNaka/MAL2Go/v3/manga" + m "github.com/MikunoNaka/MAL2Go/v4/manga" "github.com/spf13/cobra" ) diff --git a/cmd/episodes.go b/cmd/episodes.go index 13dd4ab..59fa576 100644 --- a/cmd/episodes.go +++ b/cmd/episodes.go @@ -24,7 +24,7 @@ import ( "strings" "github.com/MikunoNaka/macli/ui" "github.com/MikunoNaka/macli/mal" - a "github.com/MikunoNaka/MAL2Go/v3/anime" + a "github.com/MikunoNaka/MAL2Go/v4/anime" "github.com/spf13/cobra" ) diff --git a/cmd/score.go b/cmd/score.go index 2978944..a4a0439 100644 --- a/cmd/score.go +++ b/cmd/score.go @@ -27,8 +27,8 @@ import ( "github.com/MikunoNaka/macli/ui" "github.com/MikunoNaka/macli/mal" "github.com/MikunoNaka/macli/util" - a "github.com/MikunoNaka/MAL2Go/v3/anime" - m "github.com/MikunoNaka/MAL2Go/v3/manga" + a "github.com/MikunoNaka/MAL2Go/v4/anime" + m "github.com/MikunoNaka/MAL2Go/v4/manga" "github.com/spf13/cobra" ) diff --git a/cmd/search.go b/cmd/search.go index 88d64bc..fe6bea2 100644 --- a/cmd/search.go +++ b/cmd/search.go @@ -26,8 +26,8 @@ import ( "github.com/MikunoNaka/macli/mal" "github.com/MikunoNaka/macli/ui" "github.com/MikunoNaka/macli/util" - a "github.com/MikunoNaka/MAL2Go/v3/anime" - m "github.com/MikunoNaka/MAL2Go/v3/manga" + a "github.com/MikunoNaka/MAL2Go/v4/anime" + m "github.com/MikunoNaka/MAL2Go/v4/manga" "github.com/spf13/cobra" ) diff --git a/cmd/status.go b/cmd/status.go index 1e80c7b..c923946 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -24,8 +24,8 @@ import ( "strings" "github.com/MikunoNaka/macli/ui" "github.com/MikunoNaka/macli/mal" - a "github.com/MikunoNaka/MAL2Go/v3/anime" - m "github.com/MikunoNaka/MAL2Go/v3/manga" + a "github.com/MikunoNaka/MAL2Go/v4/anime" + m "github.com/MikunoNaka/MAL2Go/v4/manga" "github.com/spf13/cobra" ) diff --git a/go.mod b/go.mod index 29bfafb..406df62 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,8 @@ module github.com/MikunoNaka/macli go 1.18 require ( - github.com/MikunoNaka/MAL2Go/v3 v3.1.0 + github.com/MikunoNaka/MAL2Go/v4 v4.0.0 + github.com/jedib0t/go-pretty/v6 v6.3.3 github.com/manifoldco/promptui v0.9.0 github.com/spf13/cobra v1.4.0 github.com/zalando/go-keyring v0.2.1 @@ -15,6 +16,8 @@ require ( github.com/danieljoos/wincred v1.1.0 // indirect github.com/godbus/dbus/v5 v5.0.6 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/rivo/uniseg v0.2.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b // indirect + golang.org/x/sys v0.0.0-20190412213103-97732733099d // indirect ) diff --git a/go.sum b/go.sum index 4262530..5779077 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/MikunoNaka/MAL2Go/v3 v3.1.0 h1:ZTzMnpWpe4J6Gde64EibSIvemz1kJVXsqGWZpdUPL6Q= -github.com/MikunoNaka/MAL2Go/v3 v3.1.0/go.mod h1:K8GX5VGSfblL+/6l30CA6US3jIbiwBEpf/n6b/RqKKs= +github.com/MikunoNaka/MAL2Go/v4 v4.0.0 h1:8T/JCs7vu5pANSCPCK1ab03LLDX6HLqypGB88MmeYnE= +github.com/MikunoNaka/MAL2Go/v4 v4.0.0/go.mod h1:SMOngKqH871nz/jWDUSD3t09ArGsPMrFH6l//diIhgw= github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= @@ -11,30 +11,44 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/danieljoos/wincred v1.1.0 h1:3RNcEpBg4IhIChZdFRSdlQt1QjCp1sMAPIrOnm7Yf8g= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jedib0t/go-pretty/v6 v6.3.3 h1:shEWoyXqldeP54byATY3IczSfMC1b/UziOISaSxcvMQ= +github.com/jedib0t/go-pretty/v6 v6.3.3/go.mod h1:MgmISkTWDSFu0xOqiZ0mKNntMQ2mDgOcwOkwBEkMDJI= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.4 h1:wZRexSlwd7ZXfKINDLsO4r7WBt3gTKONc6K/VesHvHM= +github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/zalando/go-keyring v0.2.1 h1:MBRN/Z8H4U5wEKXiD67YbDAr5cj/DOStmSga70/2qKc= github.com/zalando/go-keyring v0.2.1/go.mod h1:g63M2PPn0w5vjmEbwAX3ib5I+41zdm4esSETOn9Y6Dw= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b h1:MQE+LT/ABUuuvEZ+YQAMSXindAdUh7slEmAkup74op4= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/mal/data.go b/mal/data.go index a488413..59b0e9a 100644 --- a/mal/data.go +++ b/mal/data.go @@ -21,8 +21,8 @@ package mal import ( "fmt" "os" - m "github.com/MikunoNaka/MAL2Go/v3/manga" - a "github.com/MikunoNaka/MAL2Go/v3/anime" + m "github.com/MikunoNaka/MAL2Go/v4/manga" + a "github.com/MikunoNaka/MAL2Go/v4/anime" ) // because MAL2Go/Anime.SearchAnime won't give us all the data sometimes diff --git a/mal/delete.go b/mal/delete.go index 5a4abca..e6cfd32 100644 --- a/mal/delete.go +++ b/mal/delete.go @@ -21,8 +21,8 @@ package mal import ( "fmt" // "os" - a "github.com/MikunoNaka/MAL2Go/v3/anime" - m "github.com/MikunoNaka/MAL2Go/v3/manga" + a "github.com/MikunoNaka/MAL2Go/v4/anime" + m "github.com/MikunoNaka/MAL2Go/v4/manga" ) func DeleteAnime(anime a.Anime) { diff --git a/mal/episodes.go b/mal/episodes.go index 56794bb..43b69c0 100644 --- a/mal/episodes.go +++ b/mal/episodes.go @@ -21,8 +21,8 @@ package mal import ( "fmt" "os" - a "github.com/MikunoNaka/MAL2Go/v3/user/anime" - m "github.com/MikunoNaka/MAL2Go/v3/user/manga" + a "github.com/MikunoNaka/MAL2Go/v4/user/anime" + m "github.com/MikunoNaka/MAL2Go/v4/user/manga" "github.com/MikunoNaka/macli/util" ) diff --git a/mal/mal.go b/mal/mal.go index a10d41a..cb9665e 100644 --- a/mal/mal.go +++ b/mal/mal.go @@ -20,11 +20,11 @@ package mal import ( "github.com/MikunoNaka/macli/auth" - a "github.com/MikunoNaka/MAL2Go/v3/anime" - m "github.com/MikunoNaka/MAL2Go/v3/manga" - u "github.com/MikunoNaka/MAL2Go/v3/user" - ua "github.com/MikunoNaka/MAL2Go/v3/user/anime" - um "github.com/MikunoNaka/MAL2Go/v3/user/manga" + 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" ) var ( diff --git a/mal/score.go b/mal/score.go index 0540192..2db6000 100644 --- a/mal/score.go +++ b/mal/score.go @@ -20,8 +20,8 @@ package mal import ( "fmt" - a "github.com/MikunoNaka/MAL2Go/v3/user/anime" - m "github.com/MikunoNaka/MAL2Go/v3/user/manga" + a "github.com/MikunoNaka/MAL2Go/v4/user/anime" + m "github.com/MikunoNaka/MAL2Go/v4/user/manga" ) func SetAnimeScore(animeId, score int) a.UpdateResponse { diff --git a/mal/search.go b/mal/search.go index e1c8166..1bad114 100644 --- a/mal/search.go +++ b/mal/search.go @@ -21,8 +21,8 @@ package mal import ( "fmt" "os" - a "github.com/MikunoNaka/MAL2Go/v3/anime" - m "github.com/MikunoNaka/MAL2Go/v3/manga" + a "github.com/MikunoNaka/MAL2Go/v4/anime" + m "github.com/MikunoNaka/MAL2Go/v4/manga" ) func SearchAnime(searchString string, fields []string) []a.Anime { diff --git a/mal/status.go b/mal/status.go index e0656ed..e48f021 100644 --- a/mal/status.go +++ b/mal/status.go @@ -21,8 +21,8 @@ package mal import ( "fmt" "os" - a "github.com/MikunoNaka/MAL2Go/v3/user/anime" - m "github.com/MikunoNaka/MAL2Go/v3/user/manga" + a "github.com/MikunoNaka/MAL2Go/v4/user/anime" + m "github.com/MikunoNaka/MAL2Go/v4/user/manga" ) func SetAnimeStatus(animeId int, status string) a.UpdateResponse { diff --git a/mal/user.go b/mal/user.go index c720fa1..c271aab 100644 --- a/mal/user.go +++ b/mal/user.go @@ -19,7 +19,7 @@ along with this program. If not, see . package mal import ( - u "github.com/MikunoNaka/MAL2Go/v3/user" + u "github.com/MikunoNaka/MAL2Go/v4/user" "fmt" "os" ) diff --git a/ui/actions.go b/ui/actions.go index 0aebcce..b626457 100644 --- a/ui/actions.go +++ b/ui/actions.go @@ -23,8 +23,8 @@ import ( "fmt" "os" p "github.com/manifoldco/promptui" - a "github.com/MikunoNaka/MAL2Go/v3/anime" - m "github.com/MikunoNaka/MAL2Go/v3/manga" + a "github.com/MikunoNaka/MAL2Go/v4/anime" + m "github.com/MikunoNaka/MAL2Go/v4/manga" "github.com/MikunoNaka/macli/mal" ) diff --git a/ui/episodes.go b/ui/episodes.go index 04ff53e..e6ac976 100644 --- a/ui/episodes.go +++ b/ui/episodes.go @@ -24,8 +24,8 @@ import ( "os" "errors" "github.com/MikunoNaka/macli/mal" - a "github.com/MikunoNaka/MAL2Go/v3/anime" - m "github.com/MikunoNaka/MAL2Go/v3/manga" + a "github.com/MikunoNaka/MAL2Go/v4/anime" + m "github.com/MikunoNaka/MAL2Go/v4/manga" p "github.com/manifoldco/promptui" ) diff --git a/ui/score.go b/ui/score.go index d035cee..c0b4fcb 100644 --- a/ui/score.go +++ b/ui/score.go @@ -25,8 +25,8 @@ import ( "os" "github.com/MikunoNaka/macli/mal" "github.com/MikunoNaka/macli/util" - m "github.com/MikunoNaka/MAL2Go/v3/manga" - a "github.com/MikunoNaka/MAL2Go/v3/anime" + m "github.com/MikunoNaka/MAL2Go/v4/manga" + a "github.com/MikunoNaka/MAL2Go/v4/anime" p "github.com/manifoldco/promptui" ) diff --git a/ui/search.go b/ui/search.go index 0b1b4b2..60089f3 100644 --- a/ui/search.go +++ b/ui/search.go @@ -24,8 +24,8 @@ import ( "os" p "github.com/manifoldco/promptui" mal "github.com/MikunoNaka/macli/mal" - a "github.com/MikunoNaka/MAL2Go/v3/anime" - m "github.com/MikunoNaka/MAL2Go/v3/manga" + a "github.com/MikunoNaka/MAL2Go/v4/anime" + m "github.com/MikunoNaka/MAL2Go/v4/manga" ) var AnimeSearchFields []string = []string { diff --git a/ui/status.go b/ui/status.go index 09bce25..d54f07e 100644 --- a/ui/status.go +++ b/ui/status.go @@ -23,8 +23,8 @@ import ( "fmt" "os" "github.com/MikunoNaka/macli/mal" - a "github.com/MikunoNaka/MAL2Go/v3/anime" - m "github.com/MikunoNaka/MAL2Go/v3/manga" + a "github.com/MikunoNaka/MAL2Go/v4/anime" + m "github.com/MikunoNaka/MAL2Go/v4/manga" p "github.com/manifoldco/promptui" ) diff --git a/util/print_anime.go b/util/print_anime.go index 05ce6e7..d3d3756 100644 --- a/util/print_anime.go +++ b/util/print_anime.go @@ -20,7 +20,7 @@ package util import ( "fmt" - a "github.com/MikunoNaka/MAL2Go/v3/anime" + a "github.com/MikunoNaka/MAL2Go/v4/anime" ) // formats and prints all the details about an anime diff --git a/util/print_manga.go b/util/print_manga.go index a35d8c4..76c3c31 100644 --- a/util/print_manga.go +++ b/util/print_manga.go @@ -20,7 +20,7 @@ package util import ( "fmt" - m "github.com/MikunoNaka/MAL2Go/v3/manga" + m "github.com/MikunoNaka/MAL2Go/v4/manga" ) // formats and prints all the details about a manga -- cgit v1.2.3