diff --git a/clientutil/backend_test.go b/clientutil/backend_test.go index ac11093c8e2978c3261506a437eec21e804d4005..561f5be3cb903ee652ab39f2d288e0f8c564c175 100644 --- a/clientutil/backend_test.go +++ b/clientutil/backend_test.go @@ -161,7 +161,7 @@ func doJSONRequests(backends *testBackends, u string, n int, shards []string) (i if len(shards) > 0 { shard = shards[rand.Intn(len(shards))] } - err = b.Call(ctx, "/", shard, struct{}{}, &resp) + err = b.Call(ctx, shard, "/", struct{}{}, &resp) cancel() if err != nil { errs++ diff --git a/clientutil/balancer.go b/clientutil/balancer.go index 1f6df88ca84ad81c4e45622a860cdeab51ffe915..9d9b7dd6cdf2f9f66b93d3f6c7f0778de44060fb 100644 --- a/clientutil/balancer.go +++ b/clientutil/balancer.go @@ -97,7 +97,7 @@ func newBalancedBackend(config *BackendConfig, resolver resolver) (*balancedBack // Call the backend. Makes an HTTP POST request to the specified uri, // with a JSON-encoded request body. It will attempt to decode the // response body as JSON. -func (b *balancedBackend) Call(ctx context.Context, path, shard string, req, resp interface{}) error { +func (b *balancedBackend) Call(ctx context.Context, shard, path string, req, resp interface{}) error { data, err := json.Marshal(req) if err != nil { return err