Fix some linter issues
This commit is contained in:
parent
4c821baab4
commit
25e6dcc9b6
2
selector/cache/cache.go
vendored
2
selector/cache/cache.go
vendored
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user