forked from joeholley/supergloo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
root.go
49 lines (41 loc) · 1.15 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
39
40
41
42
43
44
45
46
47
48
49
package cmd
import (
"context"
"github.com/solo-io/supergloo/cli/pkg/cmd/upgrade"
"github.com/solo-io/supergloo/cli/pkg/cmd/register"
"github.com/solo-io/supergloo/cli/pkg/cmd/apply"
"github.com/solo-io/supergloo/cli/pkg/cmd/create"
"github.com/solo-io/supergloo/cli/pkg/cmd/get"
"github.com/solo-io/supergloo/cli/pkg/cmd/initialize"
"github.com/solo-io/supergloo/cli/pkg/cmd/install"
"github.com/solo-io/supergloo/cli/pkg/cmd/set"
"github.com/solo-io/supergloo/cli/pkg/cmd/uninstall"
"github.com/solo-io/supergloo/cli/pkg/options"
"github.com/spf13/cobra"
)
func SuperglooCli(version string) *cobra.Command {
opts := &options.Options{
Ctx: context.Background(),
}
app := &cobra.Command{
Use: "supergloo",
Short: "CLI for Supergloo",
Long: `supergloo configures resources watched by the Supergloo Controller.
Find more information at https://solo.io`,
Version: version,
}
app.SuggestionsMinimumDistance = 1
app.AddCommand(
initialize.Cmd(opts),
upgrade.Cmd(opts),
install.Cmd(opts),
uninstall.Cmd(opts),
apply.Cmd(opts),
create.Cmd(opts),
set.Cmd(opts),
get.Cmd(opts),
register.Cmd(opts),
completionCmd(),
)
return app
}