Skip to content

Commit

Permalink
listCmd and newCmd were listed twice #242
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkobrombin committed Jun 23, 2023
1 parent 7ccb119 commit 1601a61
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
6 changes: 1 addition & 5 deletions cmd/pkgManagers.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func NewPkgManagersCommand() *cmdr.Command {
"pkgmanagers",
apx.Trans("pkgmanagers.long"),
apx.Trans("pkgmanagers.short"),
pkgmanagers,
nil,
)
cmd.Example = "apx pkgmanagers"

Expand Down Expand Up @@ -183,10 +183,6 @@ func NewPkgManagersCommand() *cmdr.Command {
return cmd
}

func pkgmanagers(cmd *cobra.Command, args []string) error {
return cmd.Help()
}

func listPkgManagers(cmd *cobra.Command, args []string) error {
pkgManagers := core.ListPkgManagers()
pkgManagersCount := len(pkgManagers)
Expand Down
6 changes: 1 addition & 5 deletions cmd/stacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func NewStacksCommand() *cmdr.Command {
"stacks",
apx.Trans("stacks.long"),
apx.Trans("stacks.short"),
stacks,
nil,
)
cmd.Example = "apx stacks"

Expand Down Expand Up @@ -153,10 +153,6 @@ func NewStacksCommand() *cmdr.Command {
return cmd
}

func stacks(cmd *cobra.Command, args []string) error {
return cmd.Help()
}

func listStacks(cmd *cobra.Command, args []string) error {
stacks := core.ListStacks()
stacksCount := len(stacks)
Expand Down
10 changes: 3 additions & 7 deletions cmd/subsyStems.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func NewSubSystemsCommand() *cmdr.Command {
"subsystems",
apx.Trans("subsystems.long"),
apx.Trans("subsystems.short"),
subsystems,
nil,
)
cmd.Example = "apx subsystems"

Expand Down Expand Up @@ -76,17 +76,13 @@ func NewSubSystemsCommand() *cmdr.Command {
*/

// Add subcommands to subsystems
cmd.AddCommand(listCmd, listCmd)
cmd.AddCommand(newCmd, newCmd)
cmd.AddCommand(listCmd)
cmd.AddCommand(newCmd)
// cmd.AddCommand(rmCmd, rmCmd)

return cmd
}

func subsystems(cmd *cobra.Command, args []string) error {
return cmd.Help()
}

func listSubSystems(cmd *cobra.Command, args []string) error {
subSystems, err := core.ListSubSystems()
if err != nil {
Expand Down

0 comments on commit 1601a61

Please sign in to comment.