open-im-server/pkg/common/cmd/msg_transfer.go
kubbot & kubecub 74de8825f6 fix bug
Signed-off-by: kubbot & kubecub <3293172751ysy@gmail.com>
2023-06-30 22:32:30 +08:00

26 lines
497 B
Go

package cmd
import (
"github.com/OpenIMSDK/Open-IM-Server/internal/msgtransfer"
"github.com/spf13/cobra"
)
type MsgTransferCmd struct {
*RootCmd
}
func NewMsgTransferCmd() MsgTransferCmd {
return MsgTransferCmd{NewRootCmd("msgTransfer")}
}
func (m *MsgTransferCmd) addRunE() {
m.Command.RunE = func(cmd *cobra.Command, args []string) error {
return msgtransfer.StartTransfer(m.getPrometheusPortFlag(cmd))
}
}
func (m *MsgTransferCmd) Exec() error {
m.addRunE()
return m.Execute()
}