linting fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2019-12-03 22:59:44 +03:00
parent 7d5bdcf993
commit a1eaf9cc20
41 changed files with 76 additions and 80 deletions

View File

@@ -83,7 +83,7 @@ func readLoop(r server.Request, s client.Stream) error {
// toNodes returns a list of node addresses from given routes
func toNodes(routes []router.Route) []string {
var nodes []string
nodes := make([]string, len(routes))
for _, node := range routes {
address := node.Address
if len(node.Gateway) > 0 {
@@ -112,6 +112,7 @@ func (p *Proxy) filterRoutes(ctx context.Context, routes []router.Route) []route
return routes
}
//nolint:prealloc
var filteredRoutes []router.Route
// filter the routes based on our headers
@@ -361,6 +362,7 @@ func (p *Proxy) ServeRequest(ctx context.Context, req server.Request, rsp server
routes = addr
}
//nolint:prealloc
var opts []client.CallOption
// set strategy to round robin