@@ -149,8 +149,8 @@ const msgIPV6Unsupported string = "IPV6 ADDRESS MISSING IN IPV4 BIN"
149149const msgInvalidBin string = "Incorrect IP2Proxy BIN file format. Please make sure that you are using the latest IP2Proxy BIN file."
150150
151151func reverseBytes (s []byte ) {
152- for i ,j := 0 , len (s ) - 1 ; i < j ; i ,j = i + 1 , j - 1 {
153- s [i ],s [j ] = s [j ], s [i ]
152+ for i , j := 0 , len (s )- 1 ; i < j ; i , j = i + 1 , j - 1 {
153+ s [i ], s [j ] = s [j ], s [i ]
154154 }
155155}
156156
@@ -180,7 +180,7 @@ func (d *DB) checkIP(ip string) (ipType uint32, ipNum uint128.Uint128, ipIndex u
180180 // ipNum.ReverseBytes()
181181 ipNum = uint128 .FromBytes (v6 )
182182 // ipNum.ReverseBytes()
183-
183+
184184 // fmt.Printf("ipNum RAW: %v\n", ipNum)
185185 // fmt.Printf("ipNum: %s\n", ipNum.String())
186186
@@ -273,7 +273,7 @@ func (d *DB) readUint128Row(row []byte, pos uint32) uint128.Uint128 {
273273
274274 // little endian to big endian
275275 // for i, j := 0, len(data)-1; i < j; i, j = i+1, j-1 {
276- // data[i], data[j] = data[j], data[i]
276+ // data[i], data[j] = data[j], data[i]
277277 // }
278278 // retVal.PutBytes(data)
279279 retVal = uint128 .FromBytes (data )
@@ -292,7 +292,7 @@ func (d *DB) readUint128(pos uint32) (uint128.Uint128, error) {
292292
293293 // little endian to big endian
294294 // for i, j := 0, len(data)-1; i < j; i, j = i+1, j-1 {
295- // data[i], data[j] = data[j], data[i]
295+ // data[i], data[j] = data[j], data[i]
296296 // }
297297 // retVal.PutBytes(data)
298298 retVal = uint128 .FromBytes (data )
@@ -683,7 +683,7 @@ func (d *DB) query(ipAddress string, mode uint32) (IP2ProxyRecord, error) {
683683
684684 ipTo = d .readUint128Row (fullRow , colSize )
685685 }
686-
686+
687687 // fmt.Printf("ipFrom: %v ipTo: %v\n", ipFrom, ipTo)
688688
689689 if ipNo .Cmp (ipFrom ) >= 0 && ipNo .Cmp (ipTo ) < 0 {
0 commit comments