mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-22 21:47:16 +02:00
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:
parent
614048ae9c
commit
1a5b8b606f
135 changed files with 341 additions and 340 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue