From 47c8bfb842f9f79e99cd6eea491fbd5d14ecac54 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka <peter.kieltyka@pressly.com> Date: Tue, 19 May 2015 16:22:56 -0400 Subject: [PATCH] Accept array of conditions, however, we can do much better --- db.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db.go b/db.go index 4e477d99..d28d94e2 100644 --- a/db.go +++ b/db.go @@ -100,8 +100,8 @@ type Func struct { // } type And []interface{} -func (a And) And(exp interface{}) And { - return append(a, exp) +func (a And) And(exp ...interface{}) And { + return append(a, exp...) } // Or is an array of interfaced that is used to join two or more expressions @@ -117,8 +117,8 @@ func (a And) And(exp interface{}) And { // } type Or []interface{} -func (o Or) Or(exp interface{}) Or { - return append(o, exp) +func (o Or) Or(exp ...interface{}) Or { + return append(o, exp...) } // Raw holds chunks of data to be passed to the database without any filtering. -- GitLab