@@ -133,16 +133,16 @@ func interpolateStringBoundary(minBytes, maxBytes []byte, ratio float64) string
133133 }
134134
135135 // Extend shorter string with null bytes for comparison
136- min := make ([]byte , maxLen )
137- max := make ([]byte , maxLen )
138- copy (min , minBytes )
139- copy (max , maxBytes )
136+ minVal := make ([]byte , maxLen )
137+ maxVal := make ([]byte , maxLen )
138+ copy (minVal , minBytes )
139+ copy (maxVal , maxBytes )
140140
141141 result := make ([]byte , maxLen )
142- for i := 0 ; i < maxLen ; i ++ {
142+ for i := range maxLen {
143143 // Interpolate each byte position
144- minByte := float64 (min [i ])
145- maxByte := float64 (max [i ])
144+ minByte := float64 (minVal [i ])
145+ maxByte := float64 (maxVal [i ])
146146 interpolated := minByte + (maxByte - minByte )* ratio
147147 result [i ] = byte (interpolated )
148148 }
@@ -292,17 +292,17 @@ func buildCursorWhereClause(columnNames []string, boundary []string) string {
292292 }
293293 }
294294
295- var conditions []string
295+ conditions := make ( []string , 0 , len ( quotedCols ))
296296
297297 // Generate OR conditions for cursor-based pagination
298298 // col1 > val1 OR (col1 = val1 AND col2 > val2) OR (col1 = val1 AND col2 = val2 AND col3 > val3) ...
299- for i := 0 ; i < len ( quotedCols ); i ++ {
299+ for i := range quotedCols {
300300 var condition strings.Builder
301301
302302 // Add equality conditions for previous columns
303303 if i > 0 {
304304 condition .WriteString ("(" )
305- for j := 0 ; j < i ; j ++ {
305+ for j := range i {
306306 if j > 0 {
307307 condition .WriteString (" AND " )
308308 }
@@ -355,17 +355,17 @@ func buildUpperBoundWhereClause(columnNames []string, upperBoundary []string) st
355355 }
356356 }
357357
358- var conditions []string
358+ conditions := make ( []string , 0 , len ( quotedCols ))
359359
360360 // Generate OR conditions for upper bound
361361 // col1 < val1 OR (col1 = val1 AND col2 < val2) OR (col1 = val1 AND col2 = val2 AND col3 < val3) ...
362- for i := 0 ; i < len ( quotedCols ); i ++ {
362+ for i := range quotedCols {
363363 var condition strings.Builder
364364
365365 // Add equality conditions for previous columns
366366 if i > 0 {
367367 condition .WriteString ("(" )
368- for j := 0 ; j < i ; j ++ {
368+ for j := range i {
369369 if j > 0 {
370370 condition .WriteString (" AND " )
371371 }
0 commit comments