Skip to content

Commit

Permalink
handler: mute contextcheck
Browse files Browse the repository at this point in the history
api/handler/locking_test.go:335:21  contextcheck  Non-inherited new context, use function like `context.WithXXX` instead

Signed-off-by: Roman Khimov <[email protected]>
  • Loading branch information
roman-khimov committed Sep 16, 2024
1 parent 6cdd12b commit 367954b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/handler/locking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func TestPutBucketLockConfigurationHandler(t *testing.T) {

w := httptest.NewRecorder()
r := httptest.NewRequest(http.MethodPut, defaultURL, bytes.NewReader(body))
r = r.WithContext(api.SetReqInfo(r.Context(), api.NewReqInfo(w, r, api.ObjectRequest{Bucket: tc.bucket})))
r = r.WithContext(api.SetReqInfo(r.Context(), api.NewReqInfo(w, r, api.ObjectRequest{Bucket: tc.bucket}))) //nolint:contextcheck

hc.Handler().PutBucketObjectLockConfigHandler(w, r)

Expand Down

0 comments on commit 367954b

Please sign in to comment.