Fix lint errors in modified code (#1952)

* pkg:makelint-#779

Signed-off-by: longyuqing112 <105913803+longyuqing112@users.noreply.github.com>

* Update msg_utils.go

* Update msg_utils.go

* Update msg_utils.go

* Update msg_utils.go

* Update msg_utils.go

* Update msg_utils.go

* Update minio.go

---------

Signed-off-by: longyuqing112 <105913803+longyuqing112@users.noreply.github.com>
Co-authored-by: Xinwei Xiong <3293172751NSS@gmail.com>
This commit is contained in:
longyuqing112
2024-02-26 10:55:36 +08:00
committed by GitHub
parent ae6d21e4ea
commit c8eed84711
9 changed files with 50 additions and 42 deletions
+9 -9
View File
@@ -22,7 +22,6 @@ import (
type MsgUtilsCmd struct {
cobra.Command
msgTool *tools.MsgTool
}
func (m *MsgUtilsCmd) AddUserIDFlag() {
@@ -38,19 +37,19 @@ func (m *MsgUtilsCmd) AddFixAllFlag() {
m.Command.PersistentFlags().BoolP("fixAll", "f", false, "openIM fix all seqs")
}
func (m *MsgUtilsCmd) getFixAllFlag(cmdLines *cobra.Command) bool {
/* func (m *MsgUtilsCmd) getFixAllFlag(cmdLines *cobra.Command) bool {
fixAll, _ := cmdLines.Flags().GetBool("fixAll")
return fixAll
}
} */
func (m *MsgUtilsCmd) AddClearAllFlag() {
m.Command.PersistentFlags().BoolP("clearAll", "c", false, "openIM clear all seqs")
}
func (m *MsgUtilsCmd) getClearAllFlag(cmdLines *cobra.Command) bool {
/* func (m *MsgUtilsCmd) getClearAllFlag(cmdLines *cobra.Command) bool {
clearAll, _ := cmdLines.Flags().GetBool("clearAll")
return clearAll
}
} */
func (m *MsgUtilsCmd) AddSuperGroupIDFlag() {
m.Command.PersistentFlags().StringP("superGroupID", "g", "", "openIM superGroupID")
@@ -65,19 +64,19 @@ func (m *MsgUtilsCmd) AddBeginSeqFlag() {
m.Command.PersistentFlags().Int64P("beginSeq", "b", 0, "openIM beginSeq")
}
func (m *MsgUtilsCmd) getBeginSeqFlag(cmdLines *cobra.Command) int64 {
/* func (m *MsgUtilsCmd) getBeginSeqFlag(cmdLines *cobra.Command) int64 {
beginSeq, _ := cmdLines.Flags().GetInt64("beginSeq")
return beginSeq
}
} */
func (m *MsgUtilsCmd) AddLimitFlag() {
m.Command.PersistentFlags().Int64P("limit", "l", 0, "openIM limit")
}
func (m *MsgUtilsCmd) getLimitFlag(cmdLines *cobra.Command) int64 {
/* func (m *MsgUtilsCmd) getLimitFlag(cmdLines *cobra.Command) int64 {
limit, _ := cmdLines.Flags().GetInt64("limit")
return limit
}
} */
func (m *MsgUtilsCmd) Execute() error {
return m.Command.Execute()
@@ -134,6 +133,7 @@ func NewSeqCmd() *SeqCmd {
return seqCmd
}
func (s *SeqCmd) GetSeqCmd() *cobra.Command {
s.Command.Run = func(cmdLines *cobra.Command, args []string) {
_, err := tools.InitMsgTool()