campaigner/cmd/report.go
Miguel de la Cruz 82dc46f787 Fix typo
2020-09-24 14:02:36 +02:00

33 lines
548 B
Go

package cmd
import (
"github.com/spf13/cobra"
"git.ctrlz.es/mgdelacroix/campaigner/app"
)
func UsersReportCmd() *cobra.Command {
return &cobra.Command{
Use: "users",
Short: "A users report",
Args: cobra.NoArgs,
Run: withApp(userReportCmdF),
}
}
func ReportCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "report",
Short: "Generates reports on campaign information",
}
cmd.AddCommand(
UsersReportCmd(),
)
return cmd
}
func userReportCmdF(a *app.App, cmd *cobra.Command, _ []string) {
a.Campaign.PrintUserReport()
}