aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth/server.go1
-rw-r--r--cmd/chapters.go10
-rw-r--r--cmd/episodes.go10
-rw-r--r--cmd/list.go6
-rw-r--r--cmd/login.go2
-rw-r--r--cmd/logout.go2
-rw-r--r--cmd/root.go2
-rw-r--r--cmd/score.go14
-rw-r--r--cmd/search.go14
-rw-r--r--cmd/status.go14
-rw-r--r--cmd/user_info.go2
-rw-r--r--cmd/volumes.go11
-rw-r--r--go.mod40
-rw-r--r--go.sum100
-rw-r--r--main.go2
-rw-r--r--mal/data.go17
-rw-r--r--mal/delete.go18
-rw-r--r--mal/episodes.go20
-rw-r--r--mal/list.go31
-rw-r--r--mal/mal.go21
-rw-r--r--mal/score.go17
-rw-r--r--mal/search.go31
-rw-r--r--mal/seasonals.go19
-rw-r--r--mal/status.go17
-rw-r--r--mal/user.go9
-rw-r--r--ui/actions.go13
-rw-r--r--ui/episodes.go11
-rw-r--r--ui/list.go7
-rw-r--r--ui/score.go11
-rw-r--r--ui/search.go9
-rw-r--r--ui/status.go9
-rw-r--r--ui/ui.go2
-rw-r--r--util/print_anime.go4
-rw-r--r--util/print_manga.go4
-rw-r--r--util/season.go6
35 files changed, 264 insertions, 242 deletions
diff --git a/auth/server.go b/auth/server.go
index 02b9382..0f2496e 100644
--- a/auth/server.go
+++ b/auth/server.go
@@ -24,7 +24,6 @@ import (
"encoding/json"
"os"
"fmt"
- // "io/ioutil"
)
func listen(clientId, verifier string) {
diff --git a/cmd/chapters.go b/cmd/chapters.go
index d65d270..38d3a3e 100644
--- a/cmd/chapters.go
+++ b/cmd/chapters.go
@@ -22,10 +22,10 @@ import (
"os"
"fmt"
"strings"
- "github.com/MikunoNaka/macli/ui"
- "github.com/MikunoNaka/macli/util"
- "github.com/MikunoNaka/macli/mal"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
+ "vidhukant.com/macli/ui"
+ "vidhukant.com/macli/util"
+ "vidhukant.com/macli/mal"
+ "vidhukant.com/mg"
"github.com/spf13/cobra"
)
@@ -55,7 +55,7 @@ var chaptersCmd = &cobra.Command{
ui.PromptLength = conf.PromptLength
mal.Init()
- var selectedManga m.Manga
+ var selectedManga mg.Manga
if entryId > 0 {
selectedManga = mal.GetMangaData(entryId, []string{"my_list_status", "num_chapters"})
}
diff --git a/cmd/episodes.go b/cmd/episodes.go
index 57dbba5..55e177d 100644
--- a/cmd/episodes.go
+++ b/cmd/episodes.go
@@ -22,10 +22,10 @@ import (
"os"
"fmt"
"strings"
- "github.com/MikunoNaka/macli/ui"
- "github.com/MikunoNaka/macli/util"
- "github.com/MikunoNaka/macli/mal"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
+ "vidhukant.com/macli/ui"
+ "vidhukant.com/macli/util"
+ "vidhukant.com/macli/mal"
+ "vidhukant.com/mg"
"github.com/spf13/cobra"
)
@@ -55,7 +55,7 @@ var episodesCmd = &cobra.Command{
ui.PromptLength = conf.PromptLength
mal.Init()
- var selectedAnime a.Anime
+ var selectedAnime mg.Anime
if entryId > 0 {
selectedAnime = mal.GetAnimeData(entryId, []string{"my_list_status", "num_episodes"})
}
diff --git a/cmd/list.go b/cmd/list.go
index 4a8cf38..cd6fcaf 100644
--- a/cmd/list.go
+++ b/cmd/list.go
@@ -21,9 +21,9 @@ package cmd
import (
"os"
"fmt"
- "github.com/MikunoNaka/macli/ui"
- "github.com/MikunoNaka/macli/util"
- "github.com/MikunoNaka/macli/mal"
+ "vidhukant.com/macli/ui"
+ "vidhukant.com/macli/util"
+ "vidhukant.com/macli/mal"
"github.com/spf13/cobra"
)
diff --git a/cmd/login.go b/cmd/login.go
index cbb0955..59da497 100644
--- a/cmd/login.go
+++ b/cmd/login.go
@@ -20,7 +20,7 @@ package cmd
import (
"fmt"
- "github.com/MikunoNaka/macli/auth"
+ "vidhukant.com/macli/auth"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"os"
diff --git a/cmd/logout.go b/cmd/logout.go
index 0826782..1ae9f3e 100644
--- a/cmd/logout.go
+++ b/cmd/logout.go
@@ -20,7 +20,7 @@ package cmd
import (
"github.com/spf13/cobra"
- "github.com/MikunoNaka/macli/auth"
+ "vidhukant.com/macli/auth"
)
var logoutCmd = &cobra.Command {
diff --git a/cmd/root.go b/cmd/root.go
index 93e4094..5edcd60 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -34,7 +34,7 @@ var (
var rootCmd = &cobra.Command{
Use: "macli",
- Version: "v1.19.0" + " " + runtime.GOOS + "/" + runtime.GOARCH,
+ Version: "v1.20.0" + " " + runtime.GOOS + "/" + runtime.GOARCH,
Short: "macli - Unofficial CLI-Based MyAnimeList Client.",
Long:
"macli is an unofficial MyAnimeClient for use inside the terminal.\n" +
diff --git a/cmd/score.go b/cmd/score.go
index f7396e7..7b1dfca 100644
--- a/cmd/score.go
+++ b/cmd/score.go
@@ -24,12 +24,10 @@ import (
"strings"
"strconv"
"errors"
- "github.com/MikunoNaka/macli/ui"
- "github.com/MikunoNaka/macli/mal"
- "github.com/MikunoNaka/macli/util"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
-
+ "vidhukant.com/macli/ui"
+ "vidhukant.com/macli/mal"
+ "vidhukant.com/macli/util"
+ "vidhukant.com/mg"
"github.com/spf13/cobra"
)
@@ -90,7 +88,7 @@ func validateScore(input string, currentScore int) (int, error) {
}
func setAnimeScore(scoreInput, searchInput string) {
- var selectedAnime a.Anime
+ var selectedAnime mg.Anime
if entryId > 0 {
selectedAnime = mal.GetAnimeData(entryId, []string{"my_list_status"})
}
@@ -129,7 +127,7 @@ func setAnimeScore(scoreInput, searchInput string) {
}
func setMangaScore(scoreInput, searchInput string) {
- var selectedManga m.Manga
+ var selectedManga mg.Manga
if entryId > 0 {
selectedManga = mal.GetMangaData(entryId, []string{"my_list_status"})
}
diff --git a/cmd/search.go b/cmd/search.go
index 8413804..48877f9 100644
--- a/cmd/search.go
+++ b/cmd/search.go
@@ -22,12 +22,10 @@ import (
"fmt"
"os"
"strings"
-
- "github.com/MikunoNaka/macli/mal"
- "github.com/MikunoNaka/macli/ui"
- "github.com/MikunoNaka/macli/util"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
+ "vidhukant.com/macli/mal"
+ "vidhukant.com/macli/ui"
+ "vidhukant.com/macli/util"
+ "vidhukant.com/mg"
"github.com/spf13/cobra"
)
@@ -70,7 +68,7 @@ var searchCmd = &cobra.Command {
}
func searchManga(searchInput string) {
- var selectedManga m.Manga
+ var selectedManga mg.Manga
mangaId := entryId
fields := []string{}
@@ -97,7 +95,7 @@ func searchManga(searchInput string) {
}
func searchAnime(searchInput string) {
- var selectedAnime a.Anime
+ var selectedAnime mg.Anime
animeId := entryId
fields := []string{}
diff --git a/cmd/status.go b/cmd/status.go
index 6b63def..533f465 100644
--- a/cmd/status.go
+++ b/cmd/status.go
@@ -22,12 +22,10 @@ import (
"fmt"
"os"
"strings"
- "github.com/MikunoNaka/macli/ui"
- "github.com/MikunoNaka/macli/util"
- "github.com/MikunoNaka/macli/mal"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
-
+ "vidhukant.com/macli/ui"
+ "vidhukant.com/macli/util"
+ "vidhukant.com/macli/mal"
+ "vidhukant.com/mg"
"github.com/spf13/cobra"
)
@@ -78,7 +76,7 @@ var statusCmd = &cobra.Command{
}
func setAnimeStatus(statusInput, searchInput string) {
- var selectedAnime a.Anime
+ var selectedAnime mg.Anime
if entryId > 0 {
selectedAnime = mal.GetAnimeData(entryId, []string{"my_list_status"})
}
@@ -112,7 +110,7 @@ func setAnimeStatus(statusInput, searchInput string) {
}
func setMangaStatus(statusInput, searchInput string) {
- var selectedManga m.Manga
+ var selectedManga mg.Manga
if entryId > 0 {
selectedManga = mal.GetMangaData(entryId, []string{"my_list_status"})
}
diff --git a/cmd/user_info.go b/cmd/user_info.go
index f8c194c..38346c8 100644
--- a/cmd/user_info.go
+++ b/cmd/user_info.go
@@ -21,7 +21,7 @@ package cmd
import (
"fmt"
"github.com/spf13/cobra"
- "github.com/MikunoNaka/macli/mal"
+ "vidhukant.com/macli/mal"
)
var userInfoCmd = &cobra.Command {
diff --git a/cmd/volumes.go b/cmd/volumes.go
index 1fb54ce..5b77e41 100644
--- a/cmd/volumes.go
+++ b/cmd/volumes.go
@@ -22,11 +22,10 @@ import (
"os"
"fmt"
"strings"
- "github.com/MikunoNaka/macli/ui"
- "github.com/MikunoNaka/macli/util"
- "github.com/MikunoNaka/macli/mal"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
-
+ "vidhukant.com/macli/ui"
+ "vidhukant.com/macli/util"
+ "vidhukant.com/macli/mal"
+ "vidhukant.com/mg"
"github.com/spf13/cobra"
)
@@ -55,7 +54,7 @@ var volumesCmd = &cobra.Command{
ui.PromptLength = conf.PromptLength
mal.Init()
- var selectedManga m.Manga
+ var selectedManga mg.Manga
if entryId > 0 {
selectedManga = mal.GetMangaData(entryId, []string{"my_list_status", "num_volumes"})
}
diff --git a/go.mod b/go.mod
index 62e8556..708795c 100644
--- a/go.mod
+++ b/go.mod
@@ -1,38 +1,36 @@
module vidhukant.com/macli
-go 1.18
+go 1.21.0
require (
- github.com/MikunoNaka/MAL2Go/v4 v4.0.1
- github.com/jedib0t/go-pretty/v6 v6.3.3
+ github.com/jedib0t/go-pretty/v6 v6.4.6
github.com/manifoldco/promptui v0.9.0
- github.com/spf13/cobra v1.4.0
- github.com/zalando/go-keyring v0.2.1
+ github.com/spf13/cobra v1.7.0
+ github.com/spf13/pflag v1.0.5
+ github.com/spf13/viper v1.16.0
+ github.com/zalando/go-keyring v0.2.3
+ vidhukant.com/mg v0.0.1
)
require (
github.com/alessio/shellescape v1.4.1 // indirect
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
- github.com/danieljoos/wincred v1.1.0 // indirect
- github.com/fsnotify/fsnotify v1.5.4 // indirect
- github.com/godbus/dbus/v5 v5.0.6 // indirect
+ github.com/danieljoos/wincred v1.2.0 // indirect
+ github.com/fsnotify/fsnotify v1.6.0 // indirect
+ github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
- github.com/inconshreveable/mousetrap v1.0.0 // indirect
- github.com/magiconair/properties v1.8.6 // indirect
+ github.com/inconshreveable/mousetrap v1.1.0 // indirect
+ github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
- github.com/pelletier/go-toml v1.9.5 // indirect
- github.com/pelletier/go-toml/v2 v2.0.1 // indirect
+ github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
- github.com/spf13/afero v1.8.2 // indirect
- github.com/spf13/cast v1.5.0 // indirect
+ github.com/spf13/afero v1.9.5 // indirect
+ github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
- github.com/spf13/pflag v1.0.5 // indirect
- github.com/spf13/viper v1.12.0 // indirect
- github.com/subosito/gotenv v1.3.0 // indirect
- golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
- golang.org/x/text v0.3.7 // indirect
- gopkg.in/ini.v1 v1.66.4 // indirect
- gopkg.in/yaml.v2 v2.4.0 // indirect
+ github.com/subosito/gotenv v1.4.2 // indirect
+ golang.org/x/sys v0.8.0 // indirect
+ golang.org/x/text v0.9.0 // indirect
+ gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
diff --git a/go.sum b/go.sum
index 03730ae..5e45d84 100644
--- a/go.sum
+++ b/go.sum
@@ -38,8 +38,6 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
-github.com/MikunoNaka/MAL2Go/v4 v4.0.1 h1:53XINjSE+V2UtKyddsFDOIySHREbkZsU9srRA98ONqU=
-github.com/MikunoNaka/MAL2Go/v4 v4.0.1/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/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@@ -53,9 +51,9 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-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/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
+github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE=
+github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec=
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=
@@ -65,13 +63,15 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
-github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
+github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
+github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
+github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
+github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-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/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
+github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -108,6 +108,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -132,29 +134,31 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
-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/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
+github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
+github.com/jedib0t/go-pretty/v6 v6.4.6 h1:v6aG9h6Uby3IusSSEjHaZNXpHFhzqMmjXcPq1Rjl9Jw=
+github.com/jedib0t/go-pretty/v6 v6.4.6/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
-github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
+github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
+github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
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/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
-github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
-github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
-github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU=
-github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
+github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
+github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18=
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
@@ -164,37 +168,42 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
+github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
-github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo=
-github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
-github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
-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/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=
+github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
+github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA=
+github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48=
+github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
+github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
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/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ=
-github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI=
+github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc=
+github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-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/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
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/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI=
-github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
+github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
+github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-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=
+github.com/zalando/go-keyring v0.2.3 h1:v9CUu9phlABObO4LPWycf+zwMG7nlbb3t/B5wa97yms=
+github.com/zalando/go-keyring v0.2.3/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
@@ -207,7 +216,7 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
-golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -272,6 +281,7 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -295,7 +305,6 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-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=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -325,11 +334,13 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
-golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
+golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -337,8 +348,10 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -482,13 +495,12 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
-gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4=
-gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
+gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
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=
@@ -502,3 +514,5 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
+vidhukant.com/mg v0.0.1 h1:XaYxh1X9n1exNZ2gQSa/34e1vaz0NyPMdUpVxH44tY8=
+vidhukant.com/mg v0.0.1/go.mod h1:2Iqo+jgEE8hINUNL1AoFrcs8UWCzuPelx/8lEPIUtqE=
diff --git a/main.go b/main.go
index f4be77f..3849093 100644
--- a/main.go
+++ b/main.go
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package main
-import "github.com/MikunoNaka/macli/cmd"
+import "vidhukant.com/macli/cmd"
func main() {
cmd.Execute()
diff --git a/mal/data.go b/mal/data.go
index 59b0e9a..4422caa 100644
--- a/mal/data.go
+++ b/mal/data.go
@@ -19,15 +19,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package mal
import (
+ "vidhukant.com/mg"
"fmt"
"os"
- 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
-func GetAnimeData(animeId int, fields []string) a.Anime {
- data, err := animeClient.GetAnimeById(animeId, fields)
+// because mg.SearchAnime won't give us all the data sometimes
+func GetAnimeData(animeId int, fields []string) mg.Anime {
+ var data mg.Anime
+ err := MALClient.GetAnimeById(&data, animeId, fields)
if err != nil {
fmt.Println("Error while fetching data about anime:", err)
os.Exit(1)
@@ -35,9 +35,10 @@ func GetAnimeData(animeId int, fields []string) a.Anime {
return data
}
-// because MAL2Go/Manga.SearchManga won't give us all the data sometimes
-func GetMangaData(mangaId int, fields []string) m.Manga {
- data, err := mangaClient.GetMangaById(mangaId, fields)
+// because mg.SearchManga won't give us all the data sometimes
+func GetMangaData(mangaId int, fields []string) mg.Manga {
+ var data mg.Manga
+ err := MALClient.GetMangaById(&data, mangaId, fields)
if err != nil {
fmt.Println("Error while fetching data about manga:", err)
os.Exit(1)
diff --git a/mal/delete.go b/mal/delete.go
index e6cfd32..61acc94 100644
--- a/mal/delete.go
+++ b/mal/delete.go
@@ -19,28 +19,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package mal
import (
+ "vidhukant.com/mg"
"fmt"
- // "os"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
)
-func DeleteAnime(anime a.Anime) {
- res, err := userAnimeClient.DeleteAnime(anime.Id)
+func DeleteAnime(anime mg.Anime) {
+ err := MALClient.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, err := userMangaClient.DeleteManga(manga.Id)
+func DeleteManga(manga mg.Manga) {
+ err := MALClient.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)
- }
}
diff --git a/mal/episodes.go b/mal/episodes.go
index 0940af5..caea1a8 100644
--- a/mal/episodes.go
+++ b/mal/episodes.go
@@ -19,15 +19,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package mal
import (
+ "vidhukant.com/macli/util"
+ "vidhukant.com/mg"
"fmt"
"os"
- a "github.com/MikunoNaka/MAL2Go/v4/user/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/user/manga"
- "github.com/MikunoNaka/macli/util"
)
-func SetEpisodes(animeId, prevValue int, ep string) a.UpdateResponse {
- res, err := userAnimeClient.SetWatchedEpisodes(animeId, util.ParseNumeric(ep, prevValue))
+func SetEpisodes(animeId, prevValue int, ep string) mg.AnimeUpdateResponse {
+ var res mg.AnimeUpdateResponse
+ err := MALClient.UpdateAnime(&res, animeId, map[string]interface{}{mg.EpisodesWatched: util.ParseNumeric(ep, prevValue)})
if err != nil {
fmt.Println("MyAnimeList returned error while updating episodes:", err)
os.Exit(1)
@@ -35,8 +35,9 @@ func SetEpisodes(animeId, prevValue int, ep string) a.UpdateResponse {
return res
}
-func SetChapters(mangaId, prevValue int, ch string) m.UpdateResponse {
- res, err := userMangaClient.SetChaptersRead(mangaId, util.ParseNumeric(ch, prevValue))
+func SetChapters(mangaId, prevValue int, ch string) mg.MangaUpdateResponse {
+ var res mg.MangaUpdateResponse
+ err := MALClient.UpdateManga(&res, mangaId, map[string]interface{}{mg.ChaptersRead: util.ParseNumeric(ch, prevValue)})
if err != nil {
fmt.Println("MyAnimeList returned error while updating chapters:", err)
os.Exit(1)
@@ -44,8 +45,9 @@ func SetChapters(mangaId, prevValue int, ch string) m.UpdateResponse {
return res
}
-func SetVolumes(mangaId, prevValue int, vol string) m.UpdateResponse {
- res, err := userMangaClient.SetVolumesRead(mangaId, util.ParseNumeric(vol, prevValue))
+func SetVolumes(mangaId, prevValue int, vol string) mg.MangaUpdateResponse {
+ var res mg.MangaUpdateResponse
+ err := MALClient.UpdateManga(&res, mangaId, map[string]interface{}{mg.VolumesRead: util.ParseNumeric(vol, prevValue)})
if err != nil {
fmt.Println("MyAnimeList returned error while updating volumes:", err)
os.Exit(1)
diff --git a/mal/list.go b/mal/list.go
index 3e9e737..f00edd9 100644
--- a/mal/list.go
+++ b/mal/list.go
@@ -19,28 +19,49 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package mal
import (
+ "vidhukant.com/mg"
"fmt"
"os"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
)
// TODO: return all the list items using loop
-func AnimeList(user, status, sort string) []a.Anime {
- res, _, err := userAnimeClient.GetAnimeList(user, status, sort, 1000, 0, SearchNSFW, []string{"title", "num_episodes", "media_type"})
+func AnimeList(user, status, sort string) []mg.Anime {
+ var res []mg.Anime
+ _, err := MALClient.GetAnimeList(&res, &mg.ListParams{
+ Username: user,
+ Status: status,
+ Sort: sort,
+ Limit: 1000,
+ Offset: 0,
+ NSFW: SearchNSFW,
+ Fields: []string{"title", "num_episodes", "media_type"},
+ })
+
if err != nil {
fmt.Println(err)
os.Exit(1)
}
+
return res
}
// TODO: return all the list items using loop
func MangaList(user, status, sort string) []m.Manga {
- res, _, err := userMangaClient.GetMangaList(user, status, sort, 1000, 0, SearchNSFW, []string{"title", "num_chapters", "num_volumes", "media_type"})
+ var res []mg.Manga
+ _, err := MALClient.GetMangaList(&res, &mg.ListParams{
+ Username: user,
+ Status: status,
+ Sort: sort,
+ Limit: 1000,
+ Offset: 0,
+ NSFW: SearchNSFW,
+ Fields: []string{"title", "num_chapters", "num_volumes", "media_type"},
+ })
+
if err != nil {
fmt.Println(err)
os.Exit(1)
}
+
return res
}
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 <http://www.gnu.org/licenses/>.
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
}
diff --git a/mal/score.go b/mal/score.go
index 2db6000..c641302 100644
--- a/mal/score.go
+++ b/mal/score.go
@@ -19,23 +19,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package mal
import (
+ "vidhukant.com/mg"
"fmt"
- a "github.com/MikunoNaka/MAL2Go/v4/user/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/user/manga"
)
-func SetAnimeScore(animeId, score int) a.UpdateResponse {
- resp, err := userAnimeClient.SetScore(animeId, score)
+func SetAnimeScore(animeId, score int) mg.AnimeUpdateResponse {
+ var res mg.AnimeUpdateResponse
+ err := MALClient.UpdateAnime(&res, animeId, map[string]interface{}{mg.Score: score})
if err != nil {
fmt.Println("MyAnimeList returned error while updating anime score:", err)
}
- return resp
+ return res
}
-func SetMangaScore(mangaId, score int) m.UpdateResponse {
- resp, err := userMangaClient.SetScore(mangaId, score)
+func SetMangaScore(mangaId, score int) mg.MangaUpdateResponse {
+ var res mg.MangaUpdateResponse
+ err := MALClient.UpdateManga(&res, mangaId, map[string]interface{}{mg.Score: score})
if err != nil {
fmt.Println("MyAnimeList returned error while updating manga score:", err)
}
- return resp
+ return res
}
diff --git a/mal/search.go b/mal/search.go
index e6e416a..b8dafb9 100644
--- a/mal/search.go
+++ b/mal/search.go
@@ -19,22 +19,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package mal
import (
+ "vidhukant.com/mg"
"fmt"
"os"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
)
-func SearchAnime(searchString string, fields []string) []a.Anime {
- fields = append([]string{"title", "id"}, fields...)
-
+func SearchAnime(searchString string, fields []string) []mg.Anime {
searchLength, searchOffset := SearchLength, SearchOffset
if AutoSel > 0 {
searchLength = 1
searchOffset = AutoSel - 1
}
- res, err := animeClient.SearchAnime(searchString, searchLength, searchOffset, SearchNSFW, fields)
+ var res []mg.Anime
+ err := MALClient.SearchAnime(&res, &mg.SearchParams{
+ Limit: searchLength,
+ Offset: searchOffset,
+ NSFW: SearchNSFW,
+ SearchString: searchString,
+ Fields: append([]string{"title", "id"}, fields...),
+ })
+
if err != nil {
fmt.Println("MyAnimeList reported error while searching:", err.Error())
os.Exit(1)
@@ -43,16 +48,22 @@ func SearchAnime(searchString string, fields []string) []a.Anime {
return res
}
-func SearchManga(searchString string, fields []string) []m.Manga {
- fields = append([]string{"title", "id"}, fields...)
-
+func SearchManga(searchString string, fields []string) []mg.Manga {
searchLength, searchOffset := SearchLength, SearchOffset
if AutoSel > 0 {
searchLength = 1
searchOffset = AutoSel - 1
}
- res, err := mangaClient.SearchManga(searchString, searchLength, searchOffset, SearchNSFW, fields)
+ var res []mg.Manga
+ err := MALClient.SearchManga(&res, &mg.SearchParams{
+ Limit: searchLength,
+ Offset: searchOffset,
+ NSFW: SearchNSFW,
+ SearchString: searchString,
+ Fields: append([]string{"title", "id"}, fields...),
+ })
+
if err != nil {
fmt.Println("MyAnimeList reported error while searching:", err.Error())
os.Exit(1)
diff --git a/mal/seasonals.go b/mal/seasonals.go
index fda130b..29cfea6 100644
--- a/mal/seasonals.go
+++ b/mal/seasonals.go
@@ -19,21 +19,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package mal
import (
+ "vidhukant.com/mg"
"fmt"
"os"
"strconv"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
)
-func GetSeasonalAnime(season a.Season, sort string) []a.Anime {
- year := strconv.Itoa(season.Year)
- fields := []string{"title", "id"}
+func GetSeasonalAnime(season a.Season, sort string) []mg.Anime {
+ var res []mg.Anime
+ err := MALClient.GetSeasonalAnime(&res, &mg.SeasonalParams{
+ Year: strconv.Itoa(season.Year),
+ Season: season.Name,
+ Sort: sort,
+ Limit: SearchLength,
+ Offset: SearchOffset,
+ NSFW: SearchNSFW,
+ Fields: []string{"title", "id"},
+ })
- res, err := animeClient.GetSeasonalAnime(year, season.Name, sort, SearchLength, SearchOffset, SearchNSFW, fields)
if err != nil {
fmt.Println("MyAnimeList reported error while getting seasonal animes:", err.Error())
os.Exit(1)
}
- return res.Animes
+ return res
}
diff --git a/mal/status.go b/mal/status.go
index e48f021..ba8eb4d 100644
--- a/mal/status.go
+++ b/mal/status.go
@@ -19,26 +19,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package mal
import (
+ "vidhukant.com/mg"
"fmt"
"os"
- a "github.com/MikunoNaka/MAL2Go/v4/user/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/user/manga"
)
-func SetAnimeStatus(animeId int, status string) a.UpdateResponse {
- resp, err := userAnimeClient.SetStatus(animeId, status)
+func SetAnimeStatus(animeId int, status string) mg.AnimeUpdateResponse {
+ var res mg.AnimeUpdateResponse
+ err := MALClient.UpdateAnime(&res, animeId, map[string]interface{}{mg.Status: status})
if err != nil {
fmt.Println("Error while parsing status:", err.Error())
os.Exit(1)
}
- return resp
+ return res
}
-func SetMangaStatus(mangaId int, status string) m.UpdateResponse {
- resp, err := userMangaClient.SetStatus(mangaId, status)
+func SetMangaStatus(mangaId int, status string) mg.MangaUpdateResponse {
+ var res mg.MangaUpdateResponse
+ err := MALClient.UpdateManga(&res, mangaId, map[string]interface{}{mg.Status: status})
if err != nil {
fmt.Println("Error while parsing status:", err.Error())
os.Exit(1)
}
- return resp
+ return res
}
diff --git a/mal/user.go b/mal/user.go
index c271aab..b9301e0 100644
--- a/mal/user.go
+++ b/mal/user.go
@@ -19,16 +19,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package mal
import (
- u "github.com/MikunoNaka/MAL2Go/v4/user"
+ "vidhukant.com/mg"
"fmt"
"os"
)
-func GetUserInfo() u.UserInfo {
- userInfo, err := userClient.GetSelfUserInfo()
+func GetUserInfo() mg.User {
+ var user mg.User
+ err := MALClient.GetSelfInfo(&user, true)
if err != nil {
fmt.Println("Error fetching User Information:", err)
os.Exit(1)
}
- return userInfo
+ return user
}
diff --git a/ui/actions.go b/ui/actions.go
index b626457..2c5d757 100644
--- a/ui/actions.go
+++ b/ui/actions.go
@@ -23,24 +23,23 @@ import (
"fmt"
"os"
p "github.com/manifoldco/promptui"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
- "github.com/MikunoNaka/macli/mal"
+ "vidhukant.com/mg"
+ "vidhukant.com/macli/mal"
)
type AnimeAction struct {
Label string
Description string
- Method func(a.Anime)
+ Method func(mg.Anime)
}
type MangaAction struct {
Label string
Description string
- Method func(m.Manga)
+ Method func(mg.Manga)
}
-func AnimeActionMenu(animeIsAdded bool) func(a.Anime) {
+func AnimeActionMenu(animeIsAdded bool) func(mg.Anime) {
options := []AnimeAction {
{"Set Status", "Set status for an anime (watching, dropped, etc)", AnimeStatusMenu},
{"Set Episodes", "Set number of episodes watched", EpisodeInput},
@@ -92,7 +91,7 @@ func AnimeActionMenu(animeIsAdded bool) func(a.Anime) {
return options[res].Method
}
-func MangaActionMenu(mangaIsAdded bool) func(m.Manga) {
+func MangaActionMenu(mangaIsAdded bool) func(mg.Manga) {
options := []MangaAction {
{"Set Status", "Set status for a manga (reading, dropped, etc)", MangaStatusMenu},
{"Set Chapters", "Set number of chapters read", ChapterInput},
diff --git a/ui/episodes.go b/ui/episodes.go
index b4137ed..182952c 100644
--- a/ui/episodes.go
+++ b/ui/episodes.go
@@ -23,9 +23,8 @@ import (
"fmt"
"os"
"errors"
- "github.com/MikunoNaka/macli/mal"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
+ "vidhukant.com/macli/mal"
+ "vidhukant.com/mg"
p "github.com/manifoldco/promptui"
)
@@ -51,7 +50,7 @@ func CreateVolumeUpdateConfirmationMessage(title string, volNum, prevVolNum int)
return fmt.Sprintf("\x1b[35m%s\x1b[0m Volumes Read :: \x1b[1;36m%d\x1b[0m", title, volNum)
}
-func EpisodeInput(anime a.Anime) {
+func EpisodeInput(anime mg.Anime) {
epWatchedNum := anime.MyListStatus.EpWatched
epTotalNum := anime.NumEpisodes
@@ -84,7 +83,7 @@ func EpisodeInput(anime a.Anime) {
fmt.Println(CreateEpisodeUpdateConfirmationMessage(anime.Title, resp.EpWatched, epWatchedNum))
}
-func ChapterInput(manga m.Manga) {
+func ChapterInput(manga mg.Manga) {
chReadNum := manga.MyListStatus.ChaptersRead
chTotalNum := manga.NumChapters
@@ -117,7 +116,7 @@ func ChapterInput(manga m.Manga) {
fmt.Println(CreateChapterUpdateConfirmationMessage(manga.Title, resp.ChaptersRead, chReadNum))
}
-func VolumeInput(manga m.Manga) {
+func VolumeInput(manga mg.Manga) {
volReadNum := manga.MyListStatus.VolumesRead
volTotalNum := manga.NumVolumes
diff --git a/ui/list.go b/ui/list.go
index a46fbb3..1c3d2c6 100644
--- a/ui/list.go
+++ b/ui/list.go
@@ -19,14 +19,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package ui
import (
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
+ "vidhukant.com/mg"
"github.com/jedib0t/go-pretty/v6/table"
"fmt"
"os"
)
-func AnimeList(animes []a.Anime) {
+func AnimeList(animes []mg.Anime) {
t := table.NewWriter()
t.SetOutputMirror(os.Stdout)
@@ -52,7 +51,7 @@ func AnimeList(animes []a.Anime) {
t.Render()
}
-func MangaList(mangas []m.Manga) {
+func MangaList(mangas []mg.Manga) {
t := table.NewWriter()
t.SetOutputMirror(os.Stdout)
diff --git a/ui/score.go b/ui/score.go
index c0b4fcb..afa40ca 100644
--- a/ui/score.go
+++ b/ui/score.go
@@ -23,10 +23,9 @@ import (
"errors"
"fmt"
"os"
- "github.com/MikunoNaka/macli/mal"
- "github.com/MikunoNaka/macli/util"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
+ "vidhukant.com/macli/mal"
+ "vidhukant.com/macli/util"
+ "vidhukant.com/mg"
p "github.com/manifoldco/promptui"
)
@@ -72,7 +71,7 @@ func CreateScoreUpdateConfirmationMessage(title string, score, prevScore int) st
return fmt.Sprintf("\x1b[35m%s\x1b[0m Score :: %s", title, FormatScore(score))
}
-func AnimeScoreInput(anime a.Anime) {
+func AnimeScoreInput(anime mg.Anime) {
currentScore := anime.MyListStatus.Score
validate := func(input string) error {
i, err := strconv.ParseFloat(input, 64)
@@ -111,7 +110,7 @@ func AnimeScoreInput(anime a.Anime) {
fmt.Println(CreateScoreUpdateConfirmationMessage(anime.Title, resp.Score ,currentScore))
}
-func MangaScoreInput(manga m.Manga) {
+func MangaScoreInput(manga mg.Manga) {
currentScore := manga.MyListStatus.Score
validate := func(input string) error {
diff --git a/ui/search.go b/ui/search.go
index a8e8f51..e492e05 100644
--- a/ui/search.go
+++ b/ui/search.go
@@ -23,9 +23,8 @@ import (
"fmt"
"os"
p "github.com/manifoldco/promptui"
- mal "github.com/MikunoNaka/macli/mal"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
+ "vidhukant.com/macli/mal"
+ "vidhukant.com/mg"
)
var AnimeSearchFields []string = []string {
@@ -38,7 +37,7 @@ var AnimeSearchFields []string = []string {
}
// only search animes probably only now
-func AnimeSearch(label, searchString string) a.Anime {
+func AnimeSearch(label, searchString string) mg.Anime {
animes := mal.SearchAnime(searchString, AnimeSearchFields)
// don't show selection prompt if --auto-select is passed
if mal.AutoSel > 0 {
@@ -155,7 +154,7 @@ var MangaSearchFields []string = []string {
"media_type", "status", "authors",
}
-func MangaSearch(label, searchString string) m.Manga {
+func MangaSearch(label, searchString string) mg.Manga {
mangas := mal.SearchManga(searchString, MangaSearchFields)
// don't show selection prompt if --auto-select is passed
if mal.AutoSel > 0 {
diff --git a/ui/status.go b/ui/status.go
index d54f07e..cd840d6 100644
--- a/ui/status.go
+++ b/ui/status.go
@@ -22,9 +22,8 @@ import (
"strings"
"fmt"
"os"
- "github.com/MikunoNaka/macli/mal"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
+ "vidhukant.com/macli/mal"
+ "vidhukant.com/mg"
p "github.com/manifoldco/promptui"
)
@@ -84,7 +83,7 @@ func CreateStatusUpdateConfirmationMessage(title, status, prevStatus string) str
return "\x1b[35m" + title + "\x1b[0m Status :: " + GetColorCodeByStatus(status) + FormatStatus(status) + "\x1b[0m"
}
-func AnimeStatusMenu(anime a.Anime) {
+func AnimeStatusMenu(anime mg.Anime) {
options := []StatusOption {
{"Watching", "watching"},
{"Completed", "completed"},
@@ -140,7 +139,7 @@ func AnimeStatusMenu(anime a.Anime) {
fmt.Println(CreateStatusUpdateConfirmationMessage(anime.Title, resp.Status, anime.MyListStatus.Status))
}
-func MangaStatusMenu(manga m.Manga) {
+func MangaStatusMenu(manga mg.Manga) {
options := []StatusOption {
{"Reading", "reading"},
{"Completed", "completed"},
diff --git a/ui/ui.go b/ui/ui.go
index 1e23f34..6886d05 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package ui
import (
- "github.com/spf13/viper"
+ "github.com/spf13/viper"
)
var PromptLength int
diff --git a/util/print_anime.go b/util/print_anime.go
index d3d3756..7266d93 100644
--- a/util/print_anime.go
+++ b/util/print_anime.go
@@ -20,11 +20,11 @@ package util
import (
"fmt"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
+ "vidhukant.com/mg"
)
// formats and prints all the details about an anime
-func PrintAnime(anime a.Anime) {
+func PrintAnime(anime mg.Anime) {
fmt.Println(anime.Id)
fmt.Println(anime.Title)
}
diff --git a/util/print_manga.go b/util/print_manga.go
index 76c3c31..3c8981f 100644
--- a/util/print_manga.go
+++ b/util/print_manga.go
@@ -20,11 +20,11 @@ package util
import (
"fmt"
- m "github.com/MikunoNaka/MAL2Go/v4/manga"
+ "vidhukant.com/mg"
)
// formats and prints all the details about a manga
-func PrintManga(manga m.Manga) {
+func PrintManga(manga mg.Manga) {
fmt.Println(manga.Id)
fmt.Println(manga.Title)
}
diff --git a/util/season.go b/util/season.go
index 62645bf..96f7e70 100644
--- a/util/season.go
+++ b/util/season.go
@@ -21,11 +21,11 @@ package util
import (
"time"
"strconv"
- a "github.com/MikunoNaka/MAL2Go/v4/anime"
+ "vidhukant.com/mg"
)
-func GetCurrentSeason() a.Season {
+func GetCurrentSeason() mg.Season {
today := time.Now()
month := today.Format("01")
@@ -43,7 +43,7 @@ func GetCurrentSeason() a.Season {
season = "fall"
}
- return a.Season {
+ return mg.Season {
Name: season,
Year: year,
}