Skip to content
This repository was archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Bind subcommands anonymously
Browse files Browse the repository at this point in the history
  • Loading branch information
blakewatters committed Apr 21, 2020
1 parent c69b2f9 commit d886450
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,16 @@ We'd love to hear your feedback at <https://github.com/opsani/cli>`,
})

// Add all sub-commands
rootCmd.AddCommand(NewLoginCommand())
rootCmd.AddCommand(NewInitCommand())
rootCmd.AddCommand(NewAppCommand())
rootCmd.AddCommand(NewLoginCommand())

discoverCmd := newDiscoverCommand()
imbCmd := newIMBCommand()
pullCmd := newPullCommand()

rootCmd.AddCommand(discoverCmd)
rootCmd.AddCommand(imbCmd)
rootCmd.AddCommand(pullCmd)

rootCmd.AddCommand(newDiscoverCommand())
rootCmd.AddCommand(newIMBCommand())
rootCmd.AddCommand(newPullCommand())

configCmd := NewConfigCommand()
rootCmd.AddCommand(configCmd.Command)

completionCmd := NewCompletionCommand()
rootCmd.AddCommand(completionCmd)

appCmd := NewAppCommand()
rootCmd.AddCommand(appCmd)
rootCmd.AddCommand(NewConfigCommand().Command)
rootCmd.AddCommand(NewCompletionCommand())

// See Execute()
rootCmd.SetFlagErrorFunc(func(cmd *cobra.Command, err error) error {
Expand Down

0 comments on commit d886450

Please sign in to comment.