-
Notifications
You must be signed in to change notification settings - Fork 53
/
root.go
38 lines (33 loc) · 1.01 KB
/
root.go
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
package opni
import (
"os"
"github.com/rancher/opni/pkg/logger"
"github.com/rancher/opni/pkg/opni/commands"
"github.com/spf13/cobra"
)
func BuildRootCmd() *cobra.Command {
rootCmd := &cobra.Command{
Use: "opni",
Long: logger.AsciiLogo(),
}
rootCmd.AddCommand(commands.BuildAccessMatrixCmd())
rootCmd.AddCommand(commands.BuildAdminCmd())
rootCmd.AddCommand(commands.BuildAgentCmd())
rootCmd.AddCommand(commands.BuildBootstrapCmd())
rootCmd.AddCommand(commands.BuildCertsCmd())
rootCmd.AddCommand(commands.BuildClustersCmd())
rootCmd.AddCommand(commands.BuildDebugCmd())
rootCmd.AddCommand(commands.BuildGatewayCmd())
rootCmd.AddCommand(commands.BuildRoleBindingsCmd())
rootCmd.AddCommand(commands.BuildRolesCmd())
rootCmd.AddCommand(commands.BuildTokensCmd())
rootCmd.AddCommand(commands.BuildVersionCmd())
rootCmd.AddCommand(commands.BuildManagerCmd())
rootCmd.AddCommand(commands.BuildCortexCmd())
return rootCmd
}
func Execute() {
if err := BuildRootCmd().Execute(); err != nil {
os.Exit(1)
}
}