You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package cmd
|
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
type CronTaskCmd struct {
|
|
*RootCmd
|
|
}
|
|
|
|
func NewCronTaskCmd() *CronTaskCmd {
|
|
return &CronTaskCmd{NewRootCmd()}
|
|
}
|
|
|
|
func (c *CronTaskCmd) AddRunE(f func() error) {
|
|
c.Command.RunE = func(cmd *cobra.Command, args []string) error {
|
|
return f()
|
|
}
|
|
}
|