Files
filebrowser/cli/cmd/db.go
1138-4EB 69a3f853bd feat: use cobra to provide subcommands, move sources to lib (#506)
- Use cobra in order to provide subcommands `serve` and `db`.
  - Subdir `cmd` is removed.
  - Subdir `cli` is created, which is a standard cobra structure.
- Sources related to the core are moved to subdir `lib`.
- #497 and #504 are merged.
- Deprecated flags are added. See https://github.com/filebrowser/filebrowser/pull/497#discussion_r209428120.
- [`viper.BindPFlags`](https://godoc.org/github.com/spf13/viper#BindPFlags) is used in order to reduce the verbosity in `serve.go`.
2018-08-22 01:29:51 +01:00

25 lines
479 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
// dbCmd represents the db command
var dbCmd = &cobra.Command{
Use: "db",
Version: rootCmd.Version,
Aliases: []string{"database"},
Short: "Manage a filebrowser database",
Long: `This is a CLI tool to ease the management of
filebrowser database files.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("db called. Command not implemented, yet.")
},
}
func init() {
rootCmd.AddCommand(dbCmd)
}