fix: 修改多个处理函数的返回类型为指针类型,以提高内存使用效率并避免不必要的拷贝
This commit is contained in:
@@ -33,7 +33,7 @@ func (am *actionManager) SendAction(action string) error {
|
||||
return am.botConn.WriteMessage(websocket.TextMessage, []byte(action))
|
||||
}
|
||||
|
||||
func (am *actionManager) SendMsg(reply model.Reply) error {
|
||||
func (am *actionManager) SendMsg(reply *model.Reply) error {
|
||||
am.sendMtx.Lock()
|
||||
defer am.sendMtx.Unlock()
|
||||
if reply.ReferOriginMsg {
|
||||
|
||||
Reference in New Issue
Block a user