• Stars
    star
    151
  • Rank 246,057 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 10 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

IP location data for Golang

17mon IP location data for Golang

Circle CI

特性

  • dat/datx 只支持 ipv4
  • ipdb 支持 ipv4/ipv6

安装

go get github.com/wangtuanjie/ip17mon@latest

使用

import (
	"fmt"
	"github.com/wangtuanjie/ip17mon"
)

func init() {
	ip17mon.Init("your data file")
}

func main() {
	loc, err := ip17mon.Find("116.228.111.18")
	if err != nil {
		fmt.Println("err:", err)
		return
	}
	fmt.Println(loc)
}

更多请参考example

许可证

基于 MIT 协议发布