Skip to content
forked from phuslu/iploc

Fastest GeoIP Country library for Go

License

Notifications You must be signed in to change notification settings

voltachan/geoip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geoip - fastest geoip country library

godoc license goreport coverage

Getting Started

package main

import (
	"fmt"
	"net"
	"github.com/phuslu/geoip"
)

func main() {
	fmt.Printf("%s", geoip.Country(net.ParseIP("2001:4860:4860::8888")))
}

// Output: US

Benchmarks

BenchmarkGeoIpCountryForIPv4-8   	20.8 ns/op	       0 B/op	       0 allocs/op
BenchmarkGeoIpCountryForIPv6-8   	38.2 ns/op	       0 B/op	       0 allocs/op

Acknowledgment

This site or product includes IP2Location LITE data available from http://www.ip2location.com.

About

Fastest GeoIP Country library for Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.9%
  • Python 0.1%