diff --git a/cli/cmd/db.go b/cli/cmd/db.go index 397dc846..2c4f059f 100644 --- a/cli/cmd/db.go +++ b/cli/cmd/db.go @@ -8,10 +8,10 @@ import ( // dbCmd represents the db command var dbCmd = &cobra.Command{ - Use: "db", + Use: "db", Version: rootCmd.Version, Aliases: []string{"database"}, - Short: "A brief description of your command", + Short: "A brief description of your command", Long: `A longer description that spans multiple lines and likely contains examples and usage of using your command. For example: diff --git a/cli/cmd/root.go b/cli/cmd/root.go index 2d989c00..19b7cc8f 100644 --- a/cli/cmd/root.go +++ b/cli/cmd/root.go @@ -14,14 +14,14 @@ var cfgFile string // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ - Use: "filebrowser", + Use: "filebrowser", Version: "(untracked)", Aliases: []string{"serve"}, - Short: "A stylish web-based file manager", + Short: "A stylish web-based file manager", Long: `File Browser is static binary composed of a golang backend and a Vue.js frontend to create, edit, copy, move, download your files easily, everywhere, every time.`, -// Run: func(cmd *cobra.Command, args []string) {}, + // Run: func(cmd *cobra.Command, args []string) {}, } // Execute adds all child commands to the root command and sets flags appropriately. diff --git a/cli/cmd/rootalias.go b/cli/cmd/rootalias.go index f5313673..9f1222d8 100644 --- a/cli/cmd/rootalias.go +++ b/cli/cmd/rootalias.go @@ -1,8 +1,8 @@ package cmd import ( - "os" "log" + "os" ) // checkRootAlias compares the first argument provided in the CLI with a list of diff --git a/cli/cmd/serve.go b/cli/cmd/serve.go index 5258e172..97b14fae 100644 --- a/cli/cmd/serve.go +++ b/cli/cmd/serve.go @@ -1,17 +1,17 @@ package cmd import ( + filebrowser "github.com/filebrowser/filebrowser/lib" "github.com/spf13/cobra" v "github.com/spf13/viper" - filebrowser "github.com/filebrowser/filebrowser/lib" ) // serveCmd represents the serve command var serveCmd = &cobra.Command{ - Use: "serve", + Use: "serve", Version: rootCmd.Version, Aliases: []string{"server"}, - Short: "A brief description of your command", + Short: "A brief description of your command", Long: `A longer description that spans multiple lines and likely contains examples and usage of using your command. For example: @@ -65,14 +65,14 @@ func init() { // User default settings var defaults = struct { - commands string - scope string - viewMode string + commands string + scope string + viewMode string allowCommands bool - allowEdit bool - allowNew bool - allowPublish bool - locale string + allowEdit bool + allowNew bool + allowPublish bool + locale string }{ "git svn hg", ".", diff --git a/cli/cmd/server.go b/cli/cmd/server.go index fe3f1105..f182f3af 100644 --- a/cli/cmd/server.go +++ b/cli/cmd/server.go @@ -1,20 +1,21 @@ package cmd import ( - "github.com/spf13/viper" - "github.com/asdine/storm" - filebrowser "github.com/filebrowser/filebrowser/lib" - "github.com/filebrowser/filebrowser/lib/bolt" - h "github.com/filebrowser/filebrowser/lib/http" - "github.com/filebrowser/filebrowser/lib/staticgen" - "github.com/hacdias/fileutils" - "gopkg.in/natefinch/lumberjack.v2" "io/ioutil" "log" "net" "net/http" "os" "path/filepath" + + "github.com/asdine/storm" + filebrowser "github.com/filebrowser/filebrowser/lib" + "github.com/filebrowser/filebrowser/lib/bolt" + h "github.com/filebrowser/filebrowser/lib/http" + "github.com/filebrowser/filebrowser/lib/staticgen" + "github.com/hacdias/fileutils" + "github.com/spf13/viper" + "gopkg.in/natefinch/lumberjack.v2" ) func Serve() { @@ -51,9 +52,9 @@ func Serve() { if b { if viper.GetString("Auth.Header") == "" { - log.Fatal("The 'auth.header' needs to be specified when '", m,"' authentication is used.") + log.Fatal("The 'auth.header' needs to be specified when '", m, "' authentication is used.") } - log.Println("[WARN] Filebrowser authentication is configured to '", m,"' authentication. This can cause a huge security issue if the infrastructure is not configured correctly.") + log.Println("[WARN] Filebrowser authentication is configured to '", m, "' authentication. This can cause a huge security issue if the infrastructure is not configured correctly.") } } diff --git a/cli/cmd/version.go b/cli/cmd/version.go index 22eea14f..7687e77c 100644 --- a/cli/cmd/version.go +++ b/cli/cmd/version.go @@ -2,6 +2,7 @@ package cmd import ( "text/template" + "github.com/spf13/cobra" )