Fix some linter issues

This commit is contained in:
Mikhail Grachev 2018-11-13 11:57:42 +03:00
parent 4c821baab4
commit 25e6dcc9b6
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) { func (c *cacheSelector) Mark(service string, node *registry.Node, err error) {
return
} }
func (c *cacheSelector) Reset(service string) { func (c *cacheSelector) Reset(service string) {
return
} }
// Close stops the watcher and destroys the cache // 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) { func (r *defaultSelector) Mark(service string, node *registry.Node, err error) {
return
} }
func (r *defaultSelector) Reset(service string) { func (r *defaultSelector) Reset(service string) {
return
} }
func (r *defaultSelector) Close() error { 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) 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 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) 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 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() resp := server.getResponse()
// Encode the response header // Encode the response header
resp.ServiceMethod = req.ServiceMethod resp.ServiceMethod = req.ServiceMethod