mirror of https://github.com/go-gorm/gorm.git
Fix panic() in isUUID()
value with value.Kind() == reflect.Slice does not have value.Type().Len()
This commit is contained in:
parent
92f9584c83
commit
c68a386f91
|
@ -70,7 +70,7 @@ func isByteArrayOrSlice(value reflect.Value) bool {
|
|||
}
|
||||
|
||||
func isUUID(value reflect.Value) bool {
|
||||
if value.Type().Len() != 16 {
|
||||
if value.Kind() != reflect.Array || value.Type().Len() != 16 {
|
||||
return false
|
||||
}
|
||||
typename := value.Type().Name()
|
||||
|
|
Loading…
Reference in New Issue