Skip to content

Commit

Permalink
修改BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
warrially committed May 6, 2020
1 parent 92d9f49 commit f6c686c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 2 additions & 6 deletions cz88.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package cz88

import (
// "fmt"

"github.com/yangtizi/go/sysutils"
)

Expand Down Expand Up @@ -58,16 +56,14 @@ func check2(nLeft uint32, nRight uint32, nValue uint32) string {

// 值比查询的左边还小, 说明值在更左边
if AddressList2[nMid].Left > nValue {
return check(nLeft, nMid, nValue)
return check2(nLeft, nMid, nValue)

}

if AddressList2[nMid].Right < nValue {
return check(nMid, nRight, nValue)
return check2(nMid, nRight, nValue)

}

//
// fmt.Println("查到了", nMid, )
return AddressList2[nMid].S
}
3 changes: 2 additions & 1 deletion gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ import (
)

func main() {
fmt.Println(cz88.GetAddress("47.56.100.100"))
fmt.Println(cz88.GetAddress("47.56.100.100"))
fmt.Println(cz88.GetAddressShort("47.56.100.100"))
}

0 comments on commit f6c686c

Please sign in to comment.