feat: remove useless code
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>pull/615/head
parent
cae8809da0
commit
46b221533a
|
@ -2,7 +2,6 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
@ -16,10 +15,6 @@ var cmdsCmd = &cobra.Command{
|
||||||
Short: "Command runner management utility",
|
Short: "Command runner management utility",
|
||||||
Long: `Command runner management utility.`,
|
Long: `Command runner management utility.`,
|
||||||
Args: cobra.NoArgs,
|
Args: cobra.NoArgs,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
|
||||||
cmd.Help()
|
|
||||||
os.Exit(0)
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func printEvents(m map[string][]string) {
|
func printEvents(m map[string][]string) {
|
||||||
|
|
|
@ -23,10 +23,6 @@ var configCmd = &cobra.Command{
|
||||||
Short: "Configuration management utility",
|
Short: "Configuration management utility",
|
||||||
Long: `Configuration management utility.`,
|
Long: `Configuration management utility.`,
|
||||||
Args: cobra.NoArgs,
|
Args: cobra.NoArgs,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
|
||||||
cmd.Help()
|
|
||||||
os.Exit(0)
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func addConfigFlags(cmd *cobra.Command) {
|
func addConfigFlags(cmd *cobra.Command) {
|
||||||
|
|
|
@ -2,7 +2,6 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/filebrowser/filebrowser/v2/rules"
|
"github.com/filebrowser/filebrowser/v2/rules"
|
||||||
"github.com/filebrowser/filebrowser/v2/settings"
|
"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
|
an user, otherwise it will be applied to the global set or
|
||||||
rules.`,
|
rules.`,
|
||||||
Args: cobra.NoArgs,
|
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)) {
|
func runRules(st *storage.Storage, cmd *cobra.Command, users func(*users.User), global func(*settings.Settings)) {
|
||||||
|
|
|
@ -22,10 +22,6 @@ var usersCmd = &cobra.Command{
|
||||||
Short: "Users management utility",
|
Short: "Users management utility",
|
||||||
Long: `Users management utility.`,
|
Long: `Users management utility.`,
|
||||||
Args: cobra.NoArgs,
|
Args: cobra.NoArgs,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
|
||||||
cmd.Help()
|
|
||||||
os.Exit(0)
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func printUsers(users []*users.User) {
|
func printUsers(users []*users.User) {
|
||||||
|
|
Loading…
Reference in New Issue