Fix lint errors in modified code (#1966)

* makelint /internal 0228

Signed-off-by: xuan <146319162+wxuanF@users.noreply.github.com>

* Update server.go

---------

Signed-off-by: xuan <146319162+wxuanF@users.noreply.github.com>
This commit is contained in:
xuan
2024-02-29 11:52:41 +08:00
committed by GitHub
parent 613bacb789
commit bcc6a95633
11 changed files with 51 additions and 50 deletions
+4 -4
View File
@@ -66,7 +66,7 @@ func (m *msgServer) sendMsgSuperGroupChat(
return nil, err
}
if err := callbackMsgModify(ctx, req); err != nil {
if modifyErr := callbackMsgModify(ctx, req); modifyErr != nil {
return nil, err
}
err = m.MsgDatabase.MsgToMQ(ctx, utils.GenConversationUniqueKeyForGroup(req.MsgData.GroupID), req.MsgData)
@@ -144,7 +144,7 @@ func (m *msgServer) sendMsgNotification(
}
func (m *msgServer) sendMsgSingleChat(ctx context.Context, req *pbmsg.SendMsgReq) (resp *pbmsg.SendMsgResp, err error) {
if err := m.messageVerification(ctx, req); err != nil {
if verificationErr := m.messageVerification(ctx, req); verificationErr != nil {
return nil, err
}
isSend := true
@@ -169,10 +169,10 @@ func (m *msgServer) sendMsgSingleChat(ctx context.Context, req *pbmsg.SendMsgReq
return nil, err
}
if err := callbackMsgModify(ctx, req); err != nil {
if modifyErr := callbackMsgModify(ctx, req); modifyErr != nil {
return nil, err
}
if err := m.MsgDatabase.MsgToMQ(ctx, utils.GenConversationUniqueKeyForSingle(req.MsgData.SendID, req.MsgData.RecvID), req.MsgData); err != nil {
if mqErr := m.MsgDatabase.MsgToMQ(ctx, utils.GenConversationUniqueKeyForSingle(req.MsgData.SendID, req.MsgData.RecvID), req.MsgData); mqErr != nil {
prommetrics.SingleChatMsgProcessFailedCounter.Inc()
return nil, err
}