-
Notifications
You must be signed in to change notification settings - Fork 166
Expand file tree
/
Copy pathcli.go
More file actions
47 lines (40 loc) · 815 Bytes
/
cli.go
File metadata and controls
47 lines (40 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Xenon
*
* Copyright 2018 The Xenon Authors.
* Code is licensed under the GPLv3.
*
*/
package main
import (
"cli/cmd"
"fmt"
"os"
"github.com/spf13/cobra"
)
const (
cliName = "xenoncli"
cliDescription = "A simple command line client for xenon"
)
var (
rootCmd = &cobra.Command{
Use: cliName,
Short: cliDescription,
SuggestFor: []string{"xenonctl"},
}
)
func init() {
rootCmd.AddCommand(cmd.NewVersionCommand())
rootCmd.AddCommand(cmd.NewInitCommand())
rootCmd.AddCommand(cmd.NewClusterCommand())
rootCmd.AddCommand(cmd.NewMysqlCommand())
rootCmd.AddCommand(cmd.NewRaftCommand())
rootCmd.AddCommand(cmd.NewXenonCommand())
rootCmd.AddCommand(cmd.NewPerfCommand())
}
func main() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(-1)
}
}