fix : slice index out of range bug
This commit is contained in:
parent
3ecd07bfaf
commit
e8143ec90b
@ -131,7 +131,7 @@ func ParseWithSpecialTableName(dest interface{}, cacheStore *sync.Map, namer Nam
|
|||||||
modelType := reflect.Indirect(value).Type()
|
modelType := reflect.Indirect(value).Type()
|
||||||
|
|
||||||
if modelType.Kind() == reflect.Interface {
|
if modelType.Kind() == reflect.Interface {
|
||||||
modelType = reflect.Indirect(reflect.ValueOf(dest)).Elem().Type()
|
modelType = reflect.Indirect(value).Elem().Type()
|
||||||
}
|
}
|
||||||
|
|
||||||
for modelType.Kind() == reflect.Slice || modelType.Kind() == reflect.Array || modelType.Kind() == reflect.Ptr {
|
for modelType.Kind() == reflect.Slice || modelType.Kind() == reflect.Array || modelType.Kind() == reflect.Ptr {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user