Skip to content

Commit

Permalink
Fixed linter
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Pracucci <[email protected]>
  • Loading branch information
pracucci committed Jun 17, 2024
1 parent 6b2300e commit ed63e1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/frontend/querymiddleware/remote_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (r *remoteReadRoundTripper) RoundTrip(req *http.Request) (*http.Response, e

// Run the query through the middlewares.
var updatedQueryReq *remoteReadQueryRequest
handler := r.middleware.Wrap(HandlerFunc(func(ctx context.Context, req MetricsQueryRequest) (Response, error) {
handler := r.middleware.Wrap(HandlerFunc(func(_ context.Context, req MetricsQueryRequest) (Response, error) {
var ok bool

// The middlewares are used only for validation, but some middlewares may manipulate
Expand Down
6 changes: 3 additions & 3 deletions pkg/frontend/querymiddleware/remote_read_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func TestRemoteReadRoundTripperCallsDownstreamOnAll(t *testing.T) {
}

actualMiddleWareCalls := 0
middleware := MetricsQueryMiddlewareFunc(func(next MetricsQueryHandler) MetricsQueryHandler {
middleware := MetricsQueryMiddlewareFunc(func(_ MetricsQueryHandler) MetricsQueryHandler {
actualMiddleWareCalls++
return tc.handler
})
Expand Down Expand Up @@ -240,8 +240,8 @@ func TestRemoteReadRoundTripper_ShouldAllowMiddlewaresToManipulateRequest(t *tes

func TestRemoteReadRoundTripper_ShouldAllowMiddlewaresToReturnEmptyResponse(t *testing.T) {
// Create a middleware that return an empty response.
middleware := MetricsQueryMiddlewareFunc(func(next MetricsQueryHandler) MetricsQueryHandler {
return HandlerFunc(func(ctx context.Context, req MetricsQueryRequest) (Response, error) {
middleware := MetricsQueryMiddlewareFunc(func(_ MetricsQueryHandler) MetricsQueryHandler {
return HandlerFunc(func(_ context.Context, _ MetricsQueryRequest) (Response, error) {
return newEmptyPrometheusResponse(), nil
})
})
Expand Down

0 comments on commit ed63e1f

Please sign in to comment.