package cmd import ( "os" ) import ( "github.com/spf13/cobra" ) import ( "auth-server/cmd/crypto" "auth-server/cmd/httpserver" "auth-server/cmd/version" ) var rootCmd = &cobra.Command{ Use: "auth-server", Short: "as", SilenceUsage: true, Long: `auth-server`, Run: func(cmd *cobra.Command, args []string) { cmd.Help() }, } func init() { rootCmd.AddCommand(httpserver.StartCmd) rootCmd.AddCommand(version.StartCmd) rootCmd.AddCommand(crypto.StartCmd) } // Execute : apply commands func Execute() { if err := rootCmd.Execute(); err != nil { os.Exit(-1) } }