all: gofmt -w -r 'interface{} -> any' .

Updates #9687
This commit is contained in:
Bjørn Erik Pedersen
2022-03-17 22:03:27 +01:00
parent 423594e03a
commit b80853de90
342 changed files with 2118 additions and 2102 deletions

View File

@@ -29,20 +29,20 @@ func TestAppend(t *testing.T) {
ns := New(&deps.Deps{})
for i, test := range []struct {
start interface{}
addend []interface{}
expected interface{}
start any
addend []any
expected any
}{
{[]string{"a", "b"}, []interface{}{"c"}, []string{"a", "b", "c"}},
{[]string{"a", "b"}, []interface{}{"c", "d", "e"}, []string{"a", "b", "c", "d", "e"}},
{[]string{"a", "b"}, []interface{}{[]string{"c", "d", "e"}}, []string{"a", "b", "c", "d", "e"}},
{[]string{"a", "b"}, []any{"c"}, []string{"a", "b", "c"}},
{[]string{"a", "b"}, []any{"c", "d", "e"}, []string{"a", "b", "c", "d", "e"}},
{[]string{"a", "b"}, []any{[]string{"c", "d", "e"}}, []string{"a", "b", "c", "d", "e"}},
// Errors
{"", []interface{}{[]string{"a", "b"}}, false},
{[]string{"a", "b"}, []interface{}{}, false},
{"", []any{[]string{"a", "b"}}, false},
{[]string{"a", "b"}, []any{}, false},
// No string concatenation.
{
"ab",
[]interface{}{"c"},
[]any{"c"},
false,
},
} {