Optimize: Some lint issues fixed.

This commit is contained in:
liyiheng
2018-12-13 20:19:59 +08:00
parent d91cc9976a
commit 1068f350b1
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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
}