staticcheck: ignore suggestion to use context.TODO instead of nil when testing nil Context

This commit is contained in:
albertony 2022-06-24 17:42:18 +02:00
parent 3e9c5eca3b
commit c9d67c86fb
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ func TestGetConfig(t *testing.T) {
ctx := context.Background()
// Check nil
config := GetConfig(nil)
config := GetConfig(nil) //lint:ignore SA1012 we want to test passing a nil Context and therefore ignore lint suggestion of using context.TODO
assert.Equal(t, globalConfig, config)
// Check empty config

View File

@ -798,7 +798,7 @@ func TestGetConfig(t *testing.T) {
ctx := context.Background()
// Check nil
config := GetConfig(nil)
config := GetConfig(nil) //lint:ignore SA1012 we want to test passing a nil Context and therefore ignore lint suggestion of using context.TODO
assert.Equal(t, globalConfig, config)
// Check empty config