This commit is contained in:
crusader 2018-04-10 20:33:07 +09:00
parent 59964f7e21
commit 791e999605

View File

@ -47,7 +47,7 @@ func ConvertToType(v interface{}, t reflect.Type) (interface{}, error) {
switch t.Kind() { switch t.Kind() {
case Map: case Map:
var ( var (
res = reflect.MakeMap(t) res = reflect.MakeMapWithSize(t, len(vv.MapKeys()))
ck interface{} ck interface{}
) )
for _, k := range vv.MapKeys() { for _, k := range vv.MapKeys() {