mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
all: gofmt -w -r 'interface{} -> any' (#2874)
This commit is contained in:
@@ -25,7 +25,7 @@ func TestEncodeArray(t *testing.T) {
|
||||
|
||||
func TestEncodeSlice(t *testing.T) {
|
||||
tests := []struct {
|
||||
in interface{}
|
||||
in any
|
||||
want string
|
||||
}{
|
||||
{
|
||||
@@ -95,7 +95,7 @@ func TestEncodeSlice(t *testing.T) {
|
||||
func TestDecodeSlice(t *testing.T) {
|
||||
tests := []struct {
|
||||
in string
|
||||
want interface{}
|
||||
want any
|
||||
}{
|
||||
{
|
||||
in: `{
|
||||
@@ -170,7 +170,7 @@ func TestDecodeBadSlice(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
in string
|
||||
new func() interface{}
|
||||
new func() any
|
||||
}{
|
||||
{
|
||||
name: "TypeMismatch",
|
||||
@@ -187,7 +187,7 @@ func TestDecodeBadSlice(t *testing.T) {
|
||||
}
|
||||
]
|
||||
}`,
|
||||
new: func() interface{} { return &[]int{} },
|
||||
new: func() any { return &[]int{} },
|
||||
},
|
||||
{
|
||||
name: "BadValue",
|
||||
@@ -204,7 +204,7 @@ func TestDecodeBadSlice(t *testing.T) {
|
||||
}
|
||||
]
|
||||
}`,
|
||||
new: func() interface{} { return &[2]int{} },
|
||||
new: func() any { return &[2]int{} },
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user