dave/cmd/swdcli/subcmd/root.go
2018-04-11 15:22:42 +02:00

22 lines
500 B
Go

package subcmd
import (
"fmt"
"github.com/spf13/cobra"
"os"
)
// RootCmd represents the base command when called without any subcommands
var RootCmd = &cobra.Command{
Use: "swdcli",
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)
}
}