From c68a386f9157f075d7bf0c2fca3693c41656e801 Mon Sep 17 00:00:00 2001 From: HARUYAMA Seigo Date: Sun, 1 Nov 2015 01:15:06 +0900 Subject: [PATCH] Fix panic() in isUUID() value with value.Kind() == reflect.Slice does not have value.Type().Len() --- postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres.go b/postgres.go index a6d98ae3..a4739c4b 100644 --- a/postgres.go +++ b/postgres.go @@ -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()