fix: 修改多个处理函数的返回类型为指针类型,以提高内存使用效率并避免不必要的拷贝
This commit is contained in:
@@ -10,9 +10,9 @@ func init() {
|
||||
handler.RegisterHandler("health", health, constants.LEVEL_USER)
|
||||
}
|
||||
|
||||
func health(msg model.Message) (reply model.Reply) {
|
||||
func health(msg model.Message) (reply *model.Reply) {
|
||||
heathResult := ""
|
||||
return model.Reply{
|
||||
return &model.Reply{
|
||||
ReplyMsg: heathResult,
|
||||
ReferOriginMsg: true,
|
||||
FromMsg: msg,
|
||||
|
||||
Reference in New Issue
Block a user