New lint rules

This commit is contained in:
Jamie Curnow
2024-11-21 19:07:36 +10:00
parent 4e6d65645f
commit 152b7666d8
85 changed files with 385 additions and 259 deletions

View File

@ -11,13 +11,13 @@ func TestFindItemInInterface(t *testing.T) {
// goleak is used to detect goroutine leaks
defer goleak.VerifyNone(t, goleak.IgnoreAnyFunction("database/sql.(*DB).connectionOpener"))
obj := map[string]interface{}{
obj := map[string]any{
"key1": "value1",
"key2": 10,
"key3": map[string]interface{}{
"key3": map[string]any{
"nestedKey": "nestedValue",
},
"key4": []interface{}{"item1", "item2"},
"key4": []any{"item1", "item2"},
}
// Test case 1: Key exists at the top level