From 46b221533a7d798560e95d619e087acca84970f5 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Mon, 7 Jan 2019 23:11:00 +0000 Subject: [PATCH] feat: remove useless code License: MIT Signed-off-by: Henrique Dias --- cmd/cmds.go | 5 ----- cmd/config.go | 4 ---- cmd/rules.go | 5 ----- cmd/users.go | 4 ---- 4 files changed, 18 deletions(-) diff --git a/cmd/cmds.go b/cmd/cmds.go index 009d0e2e..cf951995 100644 --- a/cmd/cmds.go +++ b/cmd/cmds.go @@ -2,7 +2,6 @@ package cmd import ( "fmt" - "os" "github.com/spf13/cobra" ) @@ -16,10 +15,6 @@ var cmdsCmd = &cobra.Command{ Short: "Command runner management utility", Long: `Command runner management utility.`, Args: cobra.NoArgs, - Run: func(cmd *cobra.Command, args []string) { - cmd.Help() - os.Exit(0) - }, } func printEvents(m map[string][]string) { diff --git a/cmd/config.go b/cmd/config.go index 4415805e..ac14bae5 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -23,10 +23,6 @@ var configCmd = &cobra.Command{ Short: "Configuration management utility", Long: `Configuration management utility.`, Args: cobra.NoArgs, - Run: func(cmd *cobra.Command, args []string) { - cmd.Help() - os.Exit(0) - }, } func addConfigFlags(cmd *cobra.Command) { diff --git a/cmd/rules.go b/cmd/rules.go index 619a2b03..c3490a5d 100644 --- a/cmd/rules.go +++ b/cmd/rules.go @@ -2,7 +2,6 @@ package cmd import ( "fmt" - "os" "github.com/filebrowser/filebrowser/v2/rules" "github.com/filebrowser/filebrowser/v2/settings" @@ -26,10 +25,6 @@ or none. If you set one of them, the command will apply to an user, otherwise it will be applied to the global set or rules.`, Args: cobra.NoArgs, - Run: func(cmd *cobra.Command, args []string) { - cmd.Help() - os.Exit(0) - }, } func runRules(st *storage.Storage, cmd *cobra.Command, users func(*users.User), global func(*settings.Settings)) { diff --git a/cmd/users.go b/cmd/users.go index a69199e9..fd707c64 100644 --- a/cmd/users.go +++ b/cmd/users.go @@ -22,10 +22,6 @@ var usersCmd = &cobra.Command{ Short: "Users management utility", Long: `Users management utility.`, Args: cobra.NoArgs, - Run: func(cmd *cobra.Command, args []string) { - cmd.Help() - os.Exit(0) - }, } func printUsers(users []*users.User) {