refactor(struct): Remove redundant type conversions (#3345)

This commit is contained in:
hopehook
2022-10-16 09:49:24 +08:00
committed by GitHub
parent 45c758e2f9
commit 33ab0fc155
3 changed files with 7 additions and 11 deletions
+2 -6
View File
@@ -1107,9 +1107,7 @@ func testFormBindingForType(t *testing.T, method, path, badPath, body, badBody s
assert.Equal(t,
struct {
Idx int "form:\"idx\""
}(struct {
Idx int "form:\"idx\""
}{Idx: 123}),
}{Idx: 123},
obj.StructFoo)
case "StructPointer":
obj := FooStructForStructPointerType{}
@@ -1118,9 +1116,7 @@ func testFormBindingForType(t *testing.T, method, path, badPath, body, badBody s
assert.Equal(t,
struct {
Name string "form:\"name\""
}(struct {
Name string "form:\"name\""
}{Name: "thinkerou"}),
}{Name: "thinkerou"},
*obj.StructPointerFoo)
case "Map":
obj := FooStructForMapType{}