package honeypot import ( _ "embed" "net" "github.com/oschwald/geoip2-golang" ) //go:embed Geoacumen-Country.mmdb var mmdb []byte func LookupCountry(ip net.IP) string { db, err := geoip2.FromBytes(mmdb) if err != nil { return "??" } country, err := db.Country(ip) if err != nil { return "??" } return country.Country.IsoCode }