Skip to content

RouGang/ip17mon

 
 

Repository files navigation

17mon IP location data for Golang

Circle CI

特性

  • 高效的查找算法,查询性能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 协议发布

About

17mon IP location data for Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.3%
  • Makefile 2.4%
  • Shell 1.3%