-
Notifications
You must be signed in to change notification settings - Fork 218
Expand file tree
/
Copy pathcli.go
More file actions
45 lines (37 loc) · 691 Bytes
/
cli.go
File metadata and controls
45 lines (37 loc) · 691 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
/*
* Radon
*
* Copyright 2018 The Radon Authors.
* Code is licensed under the GPLv3.
*
*/
package main
import (
"fmt"
"os"
"cli/cmd"
"github.com/spf13/cobra"
)
const (
cliName = "radoncli"
cliDescription = "A simple command line client for radon"
)
var (
rootCmd = &cobra.Command{
Use: cliName,
Short: cliDescription,
SuggestFor: []string{"radoncli"},
}
)
func init() {
rootCmd.AddCommand(cmd.NewVersionCommand())
rootCmd.AddCommand(cmd.NewReadonlyCommand())
rootCmd.AddCommand(cmd.NewTwopcCommand())
rootCmd.AddCommand(cmd.NewDebugCommand())
}
func main() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(-1)
}
}