package cmd import ( "kpt-pasture/dep" "gitee.com/xuyiping_admin/pkg/logger/zaplog" "go.uber.org/zap" "github.com/spf13/cobra" ) // ConsumerCmd represents the consumer command var ConsumerCmd = &cobra.Command{ Use: "consumer", Short: "start consumer", PersistentPreRun: func(cmd *cobra.Command, args []string) { }, } func init() { ConsumerCmd.AddCommand(workOrder) } var workOrder = &cobra.Command{ Use: "workOrder", Short: "kpt pasture work order", Run: func(cmd *cobra.Command, args []string) { srv := dep.DIAsynqWorkOrder() if err := srv.Server.Run(srv.Mux); err != nil { zaplog.Error("eventWorkflow", zap.Any("err", err)) } }, }