From f5118d1b11f6f233ee593229ab5ebba47e8ed70b Mon Sep 17 00:00:00 2001 From: Azareal Date: Thu, 5 Mar 2020 11:01:23 +1000 Subject: [PATCH] fix possible linter screw-up in buildFlexiWhere --- query_gen/mysql.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/query_gen/mysql.go b/query_gen/mysql.go index 39785b02..617437b3 100644 --- a/query_gen/mysql.go +++ b/query_gen/mysql.go @@ -4,6 +4,8 @@ package qgen import ( "database/sql" "errors" + + //"fmt" "os" "runtime" "strconv" @@ -667,7 +669,10 @@ func (a *MysqlAdapter) buildFlexiWhere(where string, dateCutoff *dateCutoff) (q switch dateCutoff.Type { case 0: sb.WriteString(" BETWEEN (UTC_TIMESTAMP() - interval ") - q += strconv.Itoa(dateCutoff.Quantity) + " " + dateCutoff.Unit + ") AND UTC_TIMESTAMP()" + sb.WriteString(strconv.Itoa(dateCutoff.Quantity)) + sb.WriteString(" ") + sb.WriteString(dateCutoff.Unit) + sb.WriteString(") AND UTC_TIMESTAMP()") case 11: sb.WriteString(" < UTC_TIMESTAMP() - interval ? ") sb.WriteString(dateCutoff.Unit) @@ -709,7 +714,6 @@ func (a *MysqlAdapter) buildFlexiWhere(where string, dateCutoff *dateCutoff) (q } } } - return sb.String(), nil }