mirror of
https://github.com/smallnest/rpcx.git
synced 2025-10-23 16:13:13 +08:00
Optimize: Some lint issues fixed.
This commit is contained in:
@@ -114,10 +114,11 @@ func (s *Server) Address() net.Addr {
|
||||
return s.ln.Addr()
|
||||
}
|
||||
|
||||
// ActiveClientConn returns active connections.
|
||||
func (s *Server) ActiveClientConn() []net.Conn {
|
||||
var result []net.Conn
|
||||
|
||||
for clientConn, _ := range s.activeConn {
|
||||
for clientConn := range s.activeConn {
|
||||
result = append(result, clientConn)
|
||||
}
|
||||
return result
|
||||
|
@@ -216,7 +216,7 @@ func (p *ConsulRegisterPlugin) Register(name string, rcvr interface{}, metadata
|
||||
|
||||
func (p *ConsulRegisterPlugin) Unregister(name string) (err error) {
|
||||
if "" == strings.TrimSpace(name) {
|
||||
err = errors.New("Register service `name` can't be empty")
|
||||
err = errors.New("Unregister service `name` can't be empty")
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user