dave/cmd/davecli/subcmd/root.go

23 lines
501 B
Go
Raw Normal View History

package subcmd
import (
"fmt"
"github.com/spf13/cobra"
"os"
)
// RootCmd represents the base command when called without any subcommands
var RootCmd = &cobra.Command{
2018-05-12 22:10:51 +02:00
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)
}
}