refactor: cmd update.

pull/2148/head
Gordon 1 year ago
parent 4c30f333f8
commit 32f31b7c8a

@ -30,6 +30,14 @@ type MsgUtilsCmd struct {
func (m *MsgUtilsCmd) AddUserIDFlag() {
m.Command.PersistentFlags().StringP("userID", "u", "", "openIM userID")
}
func (m *MsgUtilsCmd) AddIndexFlag() {
m.Command.PersistentFlags().IntP(FlagTransferIndex, "i", 0, "process startup sequence number")
}
func (m *MsgUtilsCmd) AddConfigDirFlag() {
m.Command.PersistentFlags().StringP(FlagConf, "c", "", "path of config directory")
}
func (m *MsgUtilsCmd) getUserIDFlag(cmdLines *cobra.Command) string {
userID, _ := cmdLines.Flags().GetString("userID")

Loading…
Cancel
Save