diff options
Diffstat (limited to 'common/maps/maps_test.go')
-rw-r--r-- | common/maps/maps_test.go | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/common/maps/maps_test.go b/common/maps/maps_test.go index f0c32b9fe..53120dce7 100644 --- a/common/maps/maps_test.go +++ b/common/maps/maps_test.go @@ -27,7 +27,7 @@ func TestPrepareParams(t *testing.T) { expected Params }{ { - map[string]interface{}{ + map[string]any{ "abC": 32, }, Params{ @@ -35,16 +35,16 @@ func TestPrepareParams(t *testing.T) { }, }, { - map[string]interface{}{ + map[string]any{ "abC": 32, - "deF": map[interface{}]interface{}{ + "deF": map[any]any{ 23: "A value", - 24: map[string]interface{}{ + 24: map[string]any{ "AbCDe": "A value", "eFgHi": "Another value", }, }, - "gHi": map[string]interface{}{ + "gHi": map[string]any{ "J": 25, }, "jKl": map[string]string{ @@ -85,23 +85,23 @@ func TestToSliceStringMap(t *testing.T) { c := qt.New(t) tests := []struct { - input interface{} - expected []map[string]interface{} + input any + expected []map[string]any }{ { - input: []map[string]interface{}{ + input: []map[string]any{ {"abc": 123}, }, - expected: []map[string]interface{}{ + expected: []map[string]any{ {"abc": 123}, }, }, { - input: []interface{}{ - map[string]interface{}{ + input: []any{ + map[string]any{ "def": 456, }, }, - expected: []map[string]interface{}{ + expected: []map[string]any{ {"def": 456}, }, }, @@ -116,7 +116,7 @@ func TestToSliceStringMap(t *testing.T) { func TestToParamsAndPrepare(t *testing.T) { c := qt.New(t) - _, ok := ToParamsAndPrepare(map[string]interface{}{"A": "av"}) + _, ok := ToParamsAndPrepare(map[string]any{"A": "av"}) c.Assert(ok, qt.IsTrue) params, ok := ToParamsAndPrepare(nil) @@ -127,33 +127,33 @@ func TestToParamsAndPrepare(t *testing.T) { func TestRenameKeys(t *testing.T) { c := qt.New(t) - m := map[string]interface{}{ + m := map[string]any{ "a": 32, "ren1": "m1", "ren2": "m1_2", - "sub": map[string]interface{}{ - "subsub": map[string]interface{}{ + "sub": map[string]any{ + "subsub": map[string]any{ "REN1": "m2", "ren2": "m2_2", }, }, - "no": map[string]interface{}{ + "no": map[string]any{ "ren1": "m2", "ren2": "m2_2", }, } - expected := map[string]interface{}{ + expected := map[string]any{ "a": 32, "new1": "m1", "new2": "m1_2", - "sub": map[string]interface{}{ - "subsub": map[string]interface{}{ + "sub": map[string]any{ + "subsub": map[string]any{ "new1": "m2", "ren2": "m2_2", }, }, - "no": map[string]interface{}{ + "no": map[string]any{ "ren1": "m2", "ren2": "m2_2", }, |