Fix panic() in isUUID()

value with value.Kind() == reflect.Slice does not have value.Type().Len()
This commit is contained in:
HARUYAMA Seigo 2015-11-01 01:15:06 +09:00
parent 92f9584c83
commit c68a386f91
1 changed files with 1 additions and 1 deletions

View File

@ -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()