mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-26 03:26:57 +08:00
chore: use fmt.Errorf Sprint (#469)
This commit is contained in:
parent
3ff4103711
commit
e000236eca
@ -152,7 +152,7 @@ func (e *ExtendMsgSetMongoDriver) InsertOrUpdateReactionExtendMsgSet(
|
|||||||
return utils.Wrap(err, "")
|
return utils.Wrap(err, "")
|
||||||
}
|
}
|
||||||
if set == nil {
|
if set == nil {
|
||||||
return errors.New(fmt.Sprintf("conversationID %s has no set", conversationID))
|
return fmt.Errorf("conversationID %s has no set", conversationID)
|
||||||
}
|
}
|
||||||
_, err = e.ExtendMsgSetCollection.UpdateOne(
|
_, err = e.ExtendMsgSetCollection.UpdateOne(
|
||||||
ctx,
|
ctx,
|
||||||
@ -181,7 +181,7 @@ func (e *ExtendMsgSetMongoDriver) DeleteReactionExtendMsgSet(
|
|||||||
return utils.Wrap(err, "")
|
return utils.Wrap(err, "")
|
||||||
}
|
}
|
||||||
if set == nil {
|
if set == nil {
|
||||||
return errors.New(fmt.Sprintf("conversationID %s has no set", conversationID))
|
return fmt.Errorf("conversationID %s has no set", conversationID)
|
||||||
}
|
}
|
||||||
_, err = e.ExtendMsgSetCollection.UpdateOne(
|
_, err = e.ExtendMsgSetCollection.UpdateOne(
|
||||||
ctx,
|
ctx,
|
||||||
@ -226,5 +226,5 @@ func (e *ExtendMsgSetMongoDriver) TakeExtendMsg(
|
|||||||
if v, ok := setList[0].ExtendMsgs[clientMsgID]; ok {
|
if v, ok := setList[0].ExtendMsgs[clientMsgID]; ok {
|
||||||
return &v, nil
|
return &v, nil
|
||||||
}
|
}
|
||||||
return nil, errors.New(fmt.Sprintf("cant find client msg id: %s", clientMsgID))
|
return nil, fmt.Errorf("cant find client msg id: %s", clientMsgID)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user