Package ip2country uses https://github.com/oschwald/maxminddb-golang with an embedded GeoLite2 DB to map net.IP
s to country ISO codes without dealing with DB files.
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