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 ...@@ -81,7 +81,7 @@ func NewServer(conf *rpc.ServerConfig, regConf *ProviderRegistryConfig) (*Server
for _, svr := range regConf.ServiceArray { for _, svr := range regConf.ServiceArray {
addr := gxnet.HostAddress(svr.LocalHost, svr.LocalPort) 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", return nil, jerrors.Errorf("can not find ServiceConfig addr %s in conf address array %#v",
addr, localAddrArr) addr, localAddrArr)
} }
......
...@@ -65,7 +65,7 @@ func suitableMethods(typ reflect.Type) map[string]*methodType { ...@@ -65,7 +65,7 @@ func suitableMethods(typ reflect.Type) map[string]*methodType {
// notify Method needs two ins: receiver, *args. // notify Method needs two ins: receiver, *args.
mInNum := mtype.NumIn() mInNum := mtype.NumIn()
if mInNum != 2 && mInNum != 3 { 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()) "2(notify method) or 3(serive method)", mname, mtype.NumIn())
continue continue
} }
......
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