Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 1011 Bytes

README.md

File metadata and controls

16 lines (13 loc) · 1011 Bytes

ip2country

GoDoc GitHub release (latest SemVer) GitHub Go Report Card

Package ip2country uses https://github.com/oschwald/maxminddb-golang with an embedded GeoLite2 DB to map net.IPs to country ISO codes without dealing with DB files.

Example

country, _ := ip2country.Country(net.IPv4(8, 8, 8, 8))
fmt.Println(country)
// Output: US

This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com