From 963a1e7975fe733f1314a0af3ec5536e0ffb2e46 Mon Sep 17 00:00:00 2001 From: Nick Pollett Date: Tue, 13 Aug 2019 13:30:32 +1200 Subject: [PATCH] Handle error returned from a.Value() --- bind.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bind.go b/bind.go index a3fc22cf..bd8595de 100644 --- a/bind.go +++ b/bind.go @@ -117,7 +117,11 @@ func In(query string, args ...interface{}) (string, []interface{}, error) { for i, arg := range args { if a, ok := arg.(driver.Valuer); ok { - arg, _ = a.Value() + var err error + arg, err = a.Value() + if err != nil { + return "", nil, err + } } v := reflect.ValueOf(arg) t := reflectx.Deref(v.Type())