Commit a1208bab authored by AlexStocks's avatar AlexStocks

Fix: use latest gxstrings.Contains

parent d7efa21d
......@@ -81,7 +81,7 @@ func NewServer(conf *rpc.ServerConfig, regConf *ProviderRegistryConfig) (*Server
for _, svr := range regConf.ServiceArray {
addr := gxnet.HostAddress(svr.LocalHost, svr.LocalPort)
if ok := gxstrings.Contains(localAddrArr, addr); !ok {
if ok := gxstrings.Contains(gxstrings.Strings2Ifs(localAddrArr), addr); !ok {
return nil, jerrors.Errorf("can not find ServiceConfig addr %s in conf address array %#v",
addr, localAddrArr)
}
......
......@@ -65,7 +65,7 @@ func suitableMethods(typ reflect.Type) map[string]*methodType {
// notify Method needs two ins: receiver, *args.
mInNum := mtype.NumIn()
if mInNum != 2 && mInNum != 3 {
log.Warn("method %s has wrong number of ins %d which should be " +
log.Warn("method %s has wrong number of ins %d which should be "+
"2(notify method) or 3(serive method)", mname, mtype.NumIn())
continue
}
......@@ -75,7 +75,7 @@ func suitableMethods(typ reflect.Type) map[string]*methodType {
log.Error("method{%s} argument type not exported{%v}", mname, argType)
continue
}
var replyType reflect.Type
if mInNum == 3 {
// Second arg must be a pointer.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment