diff --git a/cmd/root.go b/cmd/root.go index a2a3fd7..81d42af 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -13,7 +13,7 @@ import ( ) const ( - ReleaseVersion string = "3.4.2" + ReleaseVersion string = "3.4.3" ) var ( @@ -52,6 +52,17 @@ var ( Version bool Videos bool + RequiredArgs = []string{ + "all", + "audio", + "code", + "fallback", + "flash", + "images", + "text", + "video", + } + rootCmd = &cobra.Command{ Use: "roulette [path]...", Short: "Serves random media from the specified directories.", @@ -132,7 +143,7 @@ func init() { rootCmd.Flags().SetInterspersed(true) - rootCmd.MarkFlagsOneRequired("all", "audio", "code", "fallback", "flash", "images", "text", "video") + rootCmd.MarkFlagsOneRequired(RequiredArgs...) rootCmd.SetHelpCommand(&cobra.Command{ Hidden: true,