mirror of
https://github.com/lionsoul2014/ip2region.git
synced 2025-12-08 19:25:22 +00:00
print the dataLen and dataPtr for debug
This commit is contained in:
parent
10d3287b4d
commit
b08e798e27
@ -135,7 +135,7 @@ func (s *Searcher) Search(ip uint32) (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
//log.Printf("vIndex=%s", vIndex)
|
||||
//fmt.Printf("vIndex=%s", vIndex)
|
||||
// binary search the segment index to get the region
|
||||
var dataLen, dataPtr = 0, uint32(0)
|
||||
var buff = make([]byte, SegmentIndexBlockSize)
|
||||
@ -164,6 +164,7 @@ func (s *Searcher) Search(ip uint32) (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
//fmt.Printf("dataLen: %d, dataPtr: %d", dataLen, dataPtr)
|
||||
if dataLen == 0 {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user