From 21917fcfc6481f848b234ffd1a580108e513b3e4 Mon Sep 17 00:00:00 2001 From: Sergey Kurt Date: Sat, 18 Mar 2017 15:32:39 +0300 Subject: [PATCH] Refactored if-else in WhereClauseRepeated --- strmangle/strmangle.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/strmangle/strmangle.go b/strmangle/strmangle.go index 018ffc7..b330ac0 100644 --- a/strmangle/strmangle.go +++ b/strmangle/strmangle.go @@ -533,10 +533,9 @@ func WhereClauseRepeated(lq, rq string, start int, cols []string, count int) str buf.WriteString(") OR (") } + startIndex = 0 if start > 0 { startIndex = start + i*len(cols) - } else { - startIndex = 0 } buf.WriteString(WhereClause(lq, rq, startIndex, cols))