-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathinstance.go
More file actions
34 lines (30 loc) · 1022 Bytes
/
instance.go
File metadata and controls
34 lines (30 loc) · 1022 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
package instance
import (
"github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/create"
"github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/delete"
"github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/describe"
"github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/list"
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
"github.com/stackitcloud/stackit-cli/internal/pkg/types"
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
"github.com/spf13/cobra"
)
func NewCmd(params *types.CmdParams) *cobra.Command {
cmd := &cobra.Command{
Use: "instance",
Short: "Provides functionality for STACKIT Git instances",
Long: "Provides functionality for STACKIT Git instances.",
Args: args.NoArgs,
Run: utils.CmdHelp,
}
addSubcommands(cmd, params)
return cmd
}
func addSubcommands(cmd *cobra.Command, params *types.CmdParams) {
cmd.AddCommand(
list.NewCmd(params),
describe.NewCmd(params),
create.NewCmd(params),
delete.NewCmd(params),
)
}