From 9228897f84d898a7736f1f6df9b2aac005a89514 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 4 Jul 2022 01:15:00 +0530 Subject: using Flags instead of PersistentFlags (useless use) --- cmd/chapters.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cmd/chapters.go') 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)") } -- cgit v1.2.3