From 1027b314a6a7e4937af6561147df1d8a01542273 Mon Sep 17 00:00:00 2001 From: Akhil Mohan Date: Wed, 14 Aug 2024 14:50:39 +0530 Subject: [PATCH] ignore the static check when using anonymous struct in testing Signed-off-by: Akhil Mohan --- internal/cleanup/context_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cleanup/context_test.go b/internal/cleanup/context_test.go index ced1c3d41..82ef9348f 100644 --- a/internal/cleanup/context_test.go +++ b/internal/cleanup/context_test.go @@ -27,7 +27,7 @@ func TestBackground(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) var k struct{} v := "incontext" - ctx = context.WithValue(ctx, k, v) + ctx = context.WithValue(ctx, k, v) //nolint:staticcheck assert.Nil(t, contextError(ctx)) assert.Equal(t, ctx.Value(k), v)