Skip to content

Commit d593684

Browse files
authored
Merge pull request #7769 from oscr/clusterctl-add-command-groups
✨ clusterctl: add command groups
2 parents b2a71a3 + d49f2aa commit d593684

File tree

14 files changed

+67
-31
lines changed

14 files changed

+67
-31
lines changed

cmd/clusterctl/cmd/alpha.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import (
2121
)
2222

2323
var alphaCmd = &cobra.Command{
24-
Use: "alpha",
25-
Short: "Commands for features in alpha",
26-
Long: `These commands correspond to alpha features in clusterctl.`,
24+
Use: "alpha",
25+
GroupID: groupOther,
26+
Short: "Commands for features in alpha",
27+
Long: `These commands correspond to alpha features in clusterctl.`,
2728
}
2829

2930
func init() {

cmd/clusterctl/cmd/backup.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ type backupOptions struct {
3333
var buo = &backupOptions{}
3434

3535
var backupCmd = &cobra.Command{
36-
Use: "backup",
37-
Short: "Backup Cluster API objects and all dependencies from a management cluster",
36+
Use: "backup",
37+
GroupID: groupManagement,
38+
Short: "Backup Cluster API objects and all dependencies from a management cluster",
3839
Long: LongDesc(`
3940
Backup Cluster API objects and all dependencies from a management cluster.`),
4041

cmd/clusterctl/cmd/completion.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ var (
8080

8181
completionCmd = &cobra.Command{
8282
Use: "completion [bash|zsh]",
83+
GroupID: groupOther,
8384
Short: "Output shell completion code for the specified shell (bash or zsh)",
8485
Long: LongDesc(completionLong),
8586
Example: completionExample,

cmd/clusterctl/cmd/config.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import (
2121
)
2222

2323
var configCmd = &cobra.Command{
24-
Use: "config",
25-
Short: "Display clusterctl configuration",
26-
Long: `Display clusterctl configuration.`,
24+
Use: "config",
25+
GroupID: groupOther,
26+
Short: "Display clusterctl configuration",
27+
Long: `Display clusterctl configuration.`,
2728
}
2829

2930
func init() {

cmd/clusterctl/cmd/delete.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ type deleteOptions struct {
4040
var dd = &deleteOptions{}
4141

4242
var deleteCmd = &cobra.Command{
43-
Use: "delete [providers]",
44-
Short: "Delete one or more providers from the management cluster",
43+
Use: "delete [providers]",
44+
GroupID: groupManagement,
45+
Short: "Delete one or more providers from the management cluster",
4546
Long: LongDesc(`
4647
Delete one or more providers from the management cluster.`),
4748

cmd/clusterctl/cmd/describe.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import (
2121
)
2222

2323
var describeCmd = &cobra.Command{
24-
Use: "describe",
25-
Short: "Describe workload clusters",
26-
Long: `Describe the status of workload clusters.`,
24+
Use: "describe",
25+
GroupID: groupDebug,
26+
Short: "Describe workload clusters",
27+
Long: `Describe the status of workload clusters.`,
2728
}
2829

2930
func init() {

cmd/clusterctl/cmd/generate.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import (
2121
)
2222

2323
var generateCmd = &cobra.Command{
24-
Use: "generate",
25-
Short: "Generate yaml using clusterctl yaml processor",
26-
Long: `Generate yaml using clusterctl yaml processor.`,
24+
Use: "generate",
25+
GroupID: groupManagement,
26+
Short: "Generate yaml using clusterctl yaml processor",
27+
Long: `Generate yaml using clusterctl yaml processor.`,
2728
}
2829

2930
func init() {

cmd/clusterctl/cmd/get.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import (
2121
)
2222

2323
var getCmd = &cobra.Command{
24-
Use: "get",
25-
Short: "Get info from a management or workload cluster",
26-
Long: `Get info from a management or workload cluster`,
24+
Use: "get",
25+
GroupID: groupManagement,
26+
Short: "Get info from a management or workload cluster",
27+
Long: `Get info from a management or workload cluster`,
2728
}
2829

2930
func init() {

cmd/clusterctl/cmd/init.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ type initOptions struct {
4444
var initOpts = &initOptions{}
4545

4646
var initCmd = &cobra.Command{
47-
Use: "init",
48-
Short: "Initialize a management cluster",
47+
Use: "init",
48+
GroupID: groupManagement,
49+
Short: "Initialize a management cluster",
4950
Long: LongDesc(`
5051
Initialize a management cluster.
5152

cmd/clusterctl/cmd/move.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ type moveOptions struct {
3737
var mo = &moveOptions{}
3838

3939
var moveCmd = &cobra.Command{
40-
Use: "move",
41-
Short: "Move Cluster API objects and all dependencies between management clusters",
40+
Use: "move",
41+
GroupID: groupManagement,
42+
Short: "Move Cluster API objects and all dependencies between management clusters",
4243
Long: LongDesc(`
4344
Move Cluster API objects and all dependencies between management clusters.
4445

0 commit comments

Comments
 (0)