ignore the static check when using anonymous struct in testing
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
This commit is contained in:
parent
f8e0753366
commit
1027b314a6
@ -27,7 +27,7 @@ func TestBackground(t *testing.T) {
|
|||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
var k struct{}
|
var k struct{}
|
||||||
v := "incontext"
|
v := "incontext"
|
||||||
ctx = context.WithValue(ctx, k, v)
|
ctx = context.WithValue(ctx, k, v) //nolint:staticcheck
|
||||||
|
|
||||||
assert.Nil(t, contextError(ctx))
|
assert.Nil(t, contextError(ctx))
|
||||||
assert.Equal(t, ctx.Value(k), v)
|
assert.Equal(t, ctx.Value(k), v)
|
||||||
|
Loading…
Reference in New Issue
Block a user