Skip to content

Commit

Permalink
Add ng alias for nodegroup commands
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Jan 31, 2019
1 parent 3dfd6a7 commit 91b18a2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions pkg/ctl/create/nodegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ func createNodeGroupCmd(g *cmdutils.Grouping) *cobra.Command {
ng := cfg.NewNodeGroup()

cmd := &cobra.Command{
Use: "nodegroup",
Short: "Create a nodegroup",
Use: "nodegroup",
Short: "Create a nodegroup",
Aliases: []string{"ng"},
Run: func(_ *cobra.Command, args []string) {
if err := doCreateNodeGroup(p, cfg, ng, cmdutils.GetNameArg(args)); err != nil {
logger.Critical("%s\n", err.Error())
Expand Down
5 changes: 3 additions & 2 deletions pkg/ctl/delete/nodegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ func deleteNodeGroupCmd(g *cmdutils.Grouping) *cobra.Command {
ng := cfg.NewNodeGroup()

cmd := &cobra.Command{
Use: "nodegroup",
Short: "Delete a nodegroup",
Use: "nodegroup",
Short: "Delete a nodegroup",
Aliases: []string{"ng"},
Run: func(_ *cobra.Command, args []string) {
if err := doDeleteNodeGroup(p, cfg, ng, cmdutils.GetNameArg(args)); err != nil {
logger.Critical("%s\n", err.Error())
Expand Down
2 changes: 1 addition & 1 deletion pkg/ctl/get/nodegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func getNodegroupCmd(g *cmdutils.Grouping) *cobra.Command {
cmd := &cobra.Command{
Use: "nodegroup",
Short: "Get nodegroups(s)",
Aliases: []string{"nodegroups"},
Aliases: []string{"ng"},
Run: func(_ *cobra.Command, args []string) {
if err := doGetNodegroups(p, cfg, ng, cmdutils.GetNameArg(args)); err != nil {
logger.Critical("%s\n", err.Error())
Expand Down
5 changes: 3 additions & 2 deletions pkg/ctl/scale/nodegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ func scaleNodeGroupCmd(g *cmdutils.Grouping) *cobra.Command {
ng := cfg.NewNodeGroup()

cmd := &cobra.Command{
Use: "nodegroup",
Short: "Scale a nodegroup",
Use: "nodegroup",
Short: "Scale a nodegroup",
Aliases: []string{"ng"},
Run: func(_ *cobra.Command, args []string) {
if err := doScaleNodeGroup(p, cfg, ng, cmdutils.GetNameArg(args)); err != nil {
logger.Critical("%s\n", err.Error())
Expand Down

0 comments on commit 91b18a2

Please sign in to comment.