package subcmd import ( "fmt" "github.com/spf13/cobra" "os" ) // RootCmd represents the base command when called without any subcommands var RootCmd = &cobra.Command{ Use: "davecli", Short: "A cli for the simple webdav server", } // Execute adds all child commands to the root command and sets flags appropriately. // This is called by main.main(). It only needs to happen once to the rootCmd. func Execute() { if err := RootCmd.Execute(); err != nil { fmt.Println(err) os.Exit(1) } }