mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
18 lines
292 B
Go
18 lines
292 B
Go
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()
|
|
}
|
|
}
|