Merge pull request #322 from mgrachev/fix-linter-issues

Fix some linter issues
This commit is contained in:
Asim Aslam 2018-11-13 09:38:19 +00:00 committed by GitHub
commit 531d4dd24a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 7 deletions

View File

@ -366,11 +366,9 @@ func (c *cacheSelector) Select(service string, opts ...selector.SelectOption) (s
}
func (c *cacheSelector) Mark(service string, node *registry.Node, err error) {
return
}
func (c *cacheSelector) Reset(service string) {
return
}
// Close stops the watcher and destroys the cache

View File

@ -48,11 +48,9 @@ func (r *defaultSelector) Select(service string, opts ...SelectOption) (Next, er
}
func (r *defaultSelector) Mark(service string, node *registry.Node, err error) {
return
}
func (r *defaultSelector) Reset(service string) {
return
}
func (r *defaultSelector) Close() error {

View File

@ -80,7 +80,7 @@ func TestFilterEndpoint(t *testing.T) {
}
}
if seen == false && data.count > 0 {
if !seen && data.count > 0 {
t.Fatalf("Expected %d services but seen is %t; result %+v", data.count, seen, services)
}
}
@ -232,7 +232,7 @@ func TestFilterVersion(t *testing.T) {
seen = true
}
if seen == false && data.count > 0 {
if !seen && data.count > 0 {
t.Fatalf("Expected %d services but seen is %t; result %+v", data.count, seen, services)
}
}

View File

@ -199,7 +199,7 @@ func (server *server) register(rcvr interface{}) error {
return nil
}
func (server *server) sendResponse(sending *sync.Mutex, req *request, reply interface{}, codec serverCodec, errmsg string, last bool) (err error) {
func (server *server) sendResponse(sending sync.Locker, req *request, reply interface{}, codec serverCodec, errmsg string, last bool) (err error) {
resp := server.getResponse()
// Encode the response header
resp.ServiceMethod = req.ServiceMethod