update command descriptions

This commit is contained in:
1138-4EB 2018-08-20 18:10:59 +01:00
parent 0db7ffd576
commit 56aa09c0b2
3 changed files with 13 additions and 27 deletions

View File

@ -11,28 +11,14 @@ var dbCmd = &cobra.Command{
Use: "db", Use: "db",
Version: rootCmd.Version, Version: rootCmd.Version,
Aliases: []string{"database"}, Aliases: []string{"database"},
Short: "A brief description of your command", Short: "Manage a filebrowser database",
Long: `A longer description that spans multiple lines and likely contains examples Long: `This is a CLI tool to ease the management of
and usage of using your command. For example: filebrowser database files.`,
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
fmt.Println("db called") fmt.Println("db called. Command not implemented, yet.")
}, },
} }
func init() { func init() {
rootCmd.AddCommand(dbCmd) rootCmd.AddCommand(dbCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// dbCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// dbCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
} }

View File

@ -17,8 +17,13 @@ var rootCmd = &cobra.Command{
Version: "(untracked)", Version: "(untracked)",
Aliases: []string{"serve"}, 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 Long: `Command 'serve' is the default. Filebrowser is started
and a Vue.js frontend to create, edit, copy, move, download your files with the provided envvars, flags and/or config file. For example:
filebrowser -c config.json -p 80 -s ./srv
File Browser is a static binary composed of a golang backend and
a Vue.js frontend to create, edit, copy, move, download your files
easily, everywhere, every time.`, easily, everywhere, every time.`,
// Run: func(cmd *cobra.Command, args []string) {}, // Run: func(cmd *cobra.Command, args []string) {},
} }

View File

@ -11,13 +11,8 @@ var serveCmd = &cobra.Command{
Use: "serve", Use: "serve",
Version: rootCmd.Version, Version: rootCmd.Version,
Aliases: []string{"server"}, Aliases: []string{"server"},
Short: "A brief description of your command", Short: "Start filebrowser service",
Long: `A longer description that spans multiple lines and likely contains examples Long: rootCmd.Long,
and usage of using your command. For example:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
Serve() Serve()
}, },