kefu/cmd/root.go

25 lines
398 B
Go
Raw Normal View History

2024-12-10 02:50:12 +00:00
package cmd
import (
"github.com/spf13/cobra"
"log"
"os"
)
var rootCmd = &cobra.Command{
Use: "kefu",
Short: `简洁快速的智能在线客服系统`,
}
func init() {
rootCmd.AddCommand(serverCmd)
rootCmd.AddCommand(installCmd)
rootCmd.AddCommand(stopCmd)
}
func Execute() {
if err := rootCmd.Execute(); err != nil {
log.Println("执行命令参数错误:", err)
os.Exit(1)
}
}