fix(binding): binding error while not upload file (#3819) (#3820)

Co-authored-by: zhangmj <zhangmj1@dustess.com>
This commit is contained in:
clearcode
2024-02-05 10:46:35 +08:00
committed by GitHub
parent 9f598a31aa
commit 3dc1cd6572
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -5,6 +5,7 @@
package binding
import (
"mime/multipart"
"reflect"
"testing"
"time"
@@ -43,6 +44,7 @@ func TestMappingBaseTypes(t *testing.T) {
{"zero value", struct{ F uint }{}, "", uint(0)},
{"zero value", struct{ F bool }{}, "", false},
{"zero value", struct{ F float32 }{}, "", float32(0)},
{"file value", struct{ F *multipart.FileHeader }{}, "", &multipart.FileHeader{}},
} {
tp := reflect.TypeOf(tt.value)
testName := tt.name + ":" + tp.Field(0).Type.String()