core/lint: upgrade golangci-lint, replace interface{} with any (#5099)

* core/lint: upgrade golangci-lint, replace interface{} with any

* regen proto
This commit is contained in:
Caleb Doxsey 2024-05-02 14:33:52 -06:00 committed by GitHub
parent 614048ae9c
commit 1a5b8b606f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
135 changed files with 341 additions and 340 deletions

View file

@ -11,7 +11,7 @@ import (
func TestToValue(t *testing.T) {
testCases := []struct {
name string
value interface{}
value any
expect string
}{
{"bool", true, "true"},
@ -28,8 +28,8 @@ func TestToValue(t *testing.T) {
{"uint16", uint16(1), "1"},
{"uint32", uint32(1), "1"},
{"uint64", uint64(1), "1"},
{"[]interface{}", []interface{}{1, 2, 3, 4}, `[1,2,3,4]`},
{"map[string]interface{}", map[string]interface{}{"k1": "v1", "k2": "v2"}, `{"k1":"v1","k2":"v2"}`},
{"[]any", []any{1, 2, 3, 4}, `[1,2,3,4]`},
{"map[string]any", map[string]any{"k1": "v1", "k2": "v2"}, `{"k1":"v1","k2":"v2"}`},
{"Message", &apipb.Method{Name: "example"}, `{"name": "example"}`},
}
for _, tc := range testCases {