Chore: use any rather than interface{} (#74066)
This commit is contained in:
@@ -13,26 +13,26 @@ import (
|
||||
func TestAllowedCookies(t *testing.T) {
|
||||
testCases := []struct {
|
||||
desc string
|
||||
given map[string]interface{}
|
||||
given map[string]any
|
||||
want []string
|
||||
}{
|
||||
{
|
||||
desc: "Usual json data with keepCookies",
|
||||
given: map[string]interface{}{
|
||||
given: map[string]any{
|
||||
"keepCookies": []string{"cookie2"},
|
||||
},
|
||||
want: []string{"cookie2"},
|
||||
},
|
||||
{
|
||||
desc: "Usual json data without kepCookies",
|
||||
given: map[string]interface{}{
|
||||
given: map[string]any{
|
||||
"something": "somethingelse",
|
||||
},
|
||||
want: []string(nil),
|
||||
},
|
||||
{
|
||||
desc: "Usual json data that has multiple values in keepCookies",
|
||||
given: map[string]interface{}{
|
||||
given: map[string]any{
|
||||
"keepCookies": []string{"cookie1", "cookie2", "special[]"},
|
||||
},
|
||||
want: []string{"cookie1", "cookie2", "special[]"},
|
||||
|
||||
Reference in New Issue
Block a user