Merge pull request #322 from mgrachev/fix-linter-issues
Fix some linter issues
This commit is contained in:
commit
531d4dd24a
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) {
|
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
|
||||||
|
@ -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 {
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user