mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-09 15:12:26 +08:00
remove strings.Compare
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/silenceper/wechat/context"
|
"github.com/silenceper/wechat/context"
|
||||||
"github.com/silenceper/wechat/message"
|
"github.com/silenceper/wechat/message"
|
||||||
@@ -183,7 +182,7 @@ func (srv *Server) buildResponse(reply *message.Reply) (err error) {
|
|||||||
value := reflect.ValueOf(msgData)
|
value := reflect.ValueOf(msgData)
|
||||||
//msgData must be a ptr
|
//msgData must be a ptr
|
||||||
kind := value.Kind().String()
|
kind := value.Kind().String()
|
||||||
if 0 != strings.Compare("ptr", kind) {
|
if "ptr" != kind {
|
||||||
return message.ErrUnsupportReply
|
return message.ErrUnsupportReply
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user