print the dataLen and dataPtr for debug

This commit is contained in:
Lion 2022-06-22 15:59:29 +08:00
parent 10d3287b4d
commit b08e798e27
1 changed files with 2 additions and 1 deletions

View File

@ -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 // binary search the segment index to get the region
var dataLen, dataPtr = 0, uint32(0) var dataLen, dataPtr = 0, uint32(0)
var buff = make([]byte, SegmentIndexBlockSize) 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 { if dataLen == 0 {
return "", nil return "", nil
} }