Merge pull request #709 from pacificporter/is_byte_array_or_slice

Fix panic() in isUUID()
This commit is contained in:
Jinzhu 2015-11-09 09:24:44 +08:00
commit 611e613459
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ func isByteArrayOrSlice(value reflect.Value) bool {
} }
func isUUID(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 return false
} }
typename := value.Type().Name() typename := value.Type().Name()