2020-03-06 19:54:52 +01:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
2020-04-29 18:52:15 +01:00
|
|
|
|
|
|
|
"git.ctrlz.es/mgdelacroix/campaigner/app"
|
2020-03-06 19:54:52 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func StatusCmd() *cobra.Command {
|
|
|
|
return &cobra.Command{
|
2020-03-07 11:11:40 +01:00
|
|
|
Use: "status",
|
2020-04-27 11:22:15 +01:00
|
|
|
Short: "Prints the campaign status",
|
|
|
|
Long: "Prints the current status of the campaign and its tickets",
|
2020-03-07 11:11:40 +01:00
|
|
|
Args: cobra.NoArgs,
|
2020-04-29 18:52:15 +01:00
|
|
|
Run: withApp(statusCmdF),
|
2020-03-06 19:54:52 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-29 18:52:15 +01:00
|
|
|
func statusCmdF(a *app.App, cmd *cobra.Command, _ []string) {
|
|
|
|
a.Campaign.PrintStatus()
|
2020-03-06 19:54:52 +01:00
|
|
|
}
|