aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-07-04 01:15:00 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-07-04 01:15:00 +0530
commit9228897f84d898a7736f1f6df9b2aac005a89514 (patch)
tree473a2f50a42f4f3f7a04274d9c7d91f553b77e98 /cmd
parent7473964721c349a7f41c6fcd48df14d570cee676 (diff)
using Flags instead of PersistentFlags (useless use)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/chapters.go10
-rw-r--r--cmd/episodes.go10
-rw-r--r--cmd/score.go12
-rw-r--r--cmd/search.go12
-rw-r--r--cmd/status.go12
5 files changed, 28 insertions, 28 deletions
diff --git a/cmd/chapters.go b/cmd/chapters.go
index 3107a20..87d887b 100644
--- a/cmd/chapters.go
+++ b/cmd/chapters.go
@@ -85,9 +85,9 @@ var chaptersCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(chaptersCmd)
chaptersCmd.Flags().StringP("set-value", "s", "", "Number of chapters")
- chaptersCmd.PersistentFlags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt")
- chaptersCmd.PersistentFlags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load")
- chaptersCmd.PersistentFlags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results")
- chaptersCmd.PersistentFlags().BoolVarP(&mal.SearchNSFW, "search-nsfw", "", false, "Include NSFW-rated items in search results")
- chaptersCmd.PersistentFlags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)")
+ chaptersCmd.Flags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt")
+ chaptersCmd.Flags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load")
+ chaptersCmd.Flags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results")
+ chaptersCmd.Flags().BoolVarP(&mal.SearchNSFW, "search-nsfw", "", false, "Include NSFW-rated items in search results")
+ chaptersCmd.Flags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)")
}
diff --git a/cmd/episodes.go b/cmd/episodes.go
index 59532cd..0746712 100644
--- a/cmd/episodes.go
+++ b/cmd/episodes.go
@@ -87,9 +87,9 @@ var episodesCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(episodesCmd)
episodesCmd.Flags().StringP("set-value", "s", "", "Number of episodes")
- episodesCmd.PersistentFlags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt")
- episodesCmd.PersistentFlags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)")
- episodesCmd.PersistentFlags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load")
- episodesCmd.PersistentFlags().BoolVarP(&mal.SearchNSFW, "search-nsfw", "", false, "Include NSFW-rated items in search results")
- episodesCmd.PersistentFlags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results")
+ episodesCmd.Flags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt")
+ episodesCmd.Flags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)")
+ episodesCmd.Flags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load")
+ episodesCmd.Flags().BoolVarP(&mal.SearchNSFW, "search-nsfw", "", false, "Include NSFW-rated items in search results")
+ episodesCmd.Flags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results")
}
diff --git a/cmd/score.go b/cmd/score.go
index c69a12a..a41c66b 100644
--- a/cmd/score.go
+++ b/cmd/score.go
@@ -145,10 +145,10 @@ func setMangaScore(scoreInput, searchInput string) {
func init() {
rootCmd.AddCommand(scoreCmd)
scoreCmd.Flags().StringP("set-value", "s", "", "Score to be set")
- scoreCmd.PersistentFlags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt")
- scoreCmd.PersistentFlags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load")
- scoreCmd.PersistentFlags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results")
- scoreCmd.PersistentFlags().BoolVarP(&mal.SearchNSFW, "search-nsfw", "", false, "Include NSFW-rated items in search results")
- scoreCmd.PersistentFlags().BoolVarP(&mangaMode, "manga", "m", false, "Use manga mode")
- scoreCmd.PersistentFlags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)")
+ scoreCmd.Flags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt")
+ scoreCmd.Flags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load")
+ scoreCmd.Flags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results")
+ scoreCmd.Flags().BoolVarP(&mal.SearchNSFW, "search-nsfw", "", false, "Include NSFW-rated items in search results")
+ scoreCmd.Flags().BoolVarP(&mangaMode, "manga", "m", false, "Use manga mode")
+ scoreCmd.Flags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)")
}
diff --git a/cmd/search.go b/cmd/search.go
index 053cece..92a1b24 100644
--- a/cmd/search.go
+++ b/cmd/search.go
@@ -77,10 +77,10 @@ func searchAnime(searchInput string) {
func init() {
rootCmd.AddCommand(searchCmd)
- searchCmd.PersistentFlags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt")
- searchCmd.PersistentFlags().BoolVarP(&mangaMode, "manga", "m", false, "Use manga mode")
- searchCmd.PersistentFlags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load")
- searchCmd.PersistentFlags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results")
- searchCmd.PersistentFlags().BoolVarP(&mal.SearchNSFW, "search-nsfw", "", false, "Include NSFW-rated items in search results")
- searchCmd.PersistentFlags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)")
+ searchCmd.Flags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt")
+ searchCmd.Flags().BoolVarP(&mangaMode, "manga", "m", false, "Use manga mode")
+ searchCmd.Flags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load")
+ searchCmd.Flags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results")
+ searchCmd.Flags().BoolVarP(&mal.SearchNSFW, "search-nsfw", "", false, "Include NSFW-rated items in search results")
+ searchCmd.Flags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)")
}
diff --git a/cmd/status.go b/cmd/status.go
index e828219..540d84e 100644
--- a/cmd/status.go
+++ b/cmd/status.go
@@ -124,10 +124,10 @@ func setMangaStatus(statusInput, searchInput string) {
func init() {
rootCmd.AddCommand(statusCmd)
statusCmd.Flags().StringP("set-value", "s", "", "status to be set")
- statusCmd.PersistentFlags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt")
- statusCmd.PersistentFlags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load")
- statusCmd.PersistentFlags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results")
- statusCmd.PersistentFlags().BoolVarP(&mal.SearchNSFW, "search-nsfw", "", false, "Include NSFW-rated items in search results")
- statusCmd.PersistentFlags().BoolVarP(&mangaMode, "manga", "m", false, "Use manga mode")
- statusCmd.PersistentFlags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)")
+ statusCmd.Flags().IntVarP(&ui.PromptLength, "prompt-length", "l", 5, "Length of select prompt")
+ statusCmd.Flags().IntVarP(&mal.SearchLength, "search-length", "n", 10, "Amount of search results to load")
+ statusCmd.Flags().IntVarP(&mal.SearchOffset, "search-offset", "o", 0, "Offset for the search results")
+ statusCmd.Flags().BoolVarP(&mal.SearchNSFW, "search-nsfw", "", false, "Include NSFW-rated items in search results")
+ statusCmd.Flags().BoolVarP(&mangaMode, "manga", "m", false, "Use manga mode")
+ statusCmd.Flags().BoolVarP(&queryOnlyMode, "query", "q", false, "Query only (don't update data)")
}