mirror of
https://github.com/wangtuanjie/ip17mon.git
synced 2020-06-03 16:49:28 +00:00
66aedc5b63
datx and dump api |
||
---|---|---|
example/qip | ||
tools | ||
.gitignore | ||
17monipdb.dat | ||
circle.yml | ||
ip17mon_test.go | ||
ip17mon.go | ||
LICENSE | ||
Makefile | ||
README.md |
17mon IP location data for Golang
特性
- 高效的查找算法,查询性能100w/s
- 支持build出的bin文件包含原始数据
安装
go get -u github.com/wangtuanjie/ip17mon
使用
import (
"fmt"
"github.com/wangtuanjie/ip17mon"
)
func init() {
if err := ip17mon.Init("your data file"); err != nil {
panic(err)
}
}
func main() {
loc, err := ip17mon.Find("116.228.111.18")
if err != nil {
fmt.Println("err:", err)
return
}
fmt.Println(loc)
}
更多请参考example
许可证
基于 MIT 协议发布