2020-02-28 23:54:14 +01:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
2020-02-29 00:02:56 +01:00
|
|
|
func RootCmd() *cobra.Command {
|
|
|
|
cmd := &cobra.Command{
|
|
|
|
Use: "campaigner",
|
|
|
|
Short: "Create and manage Open Source campaigns",
|
|
|
|
}
|
|
|
|
|
|
|
|
cmd.AddCommand(
|
2020-02-29 00:59:54 +01:00
|
|
|
AddCmd(),
|
2020-02-29 00:49:55 +01:00
|
|
|
InitCmd(),
|
2020-02-29 00:02:56 +01:00
|
|
|
TokenCmd(),
|
|
|
|
)
|
2020-02-29 00:23:26 +01:00
|
|
|
|
2020-02-29 00:02:56 +01:00
|
|
|
return cmd
|
2020-02-28 23:54:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func Execute() {
|
2020-02-29 00:02:56 +01:00
|
|
|
if err := RootCmd().Execute(); err != nil {
|
2020-02-28 23:54:14 +01:00
|
|
|
fmt.Fprintln(os.Stderr, err)
|
|
|
|
}
|
|
|
|
}
|