{"id":37103611,"url":"https://github.com/adjust/geoip2-golang","last_synced_at":"2026-01-14T12:32:31.409Z","repository":{"id":57578124,"uuid":"43355784","full_name":"adjust/geoip2-golang","owner":"adjust","description":"Unofficial MaxMind GeoIP2 Reader for Go","archived":false,"fork":true,"pushed_at":"2015-09-29T16:26:47.000Z","size":153,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-06-20T15:01:56.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"oschwald/geoip2-golang","license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adjust.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-29T08:49:02.000Z","updated_at":"2019-04-26T14:38:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/adjust/geoip2-golang","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/adjust/geoip2-golang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fgeoip2-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fgeoip2-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fgeoip2-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fgeoip2-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adjust","download_url":"https://codeload.github.com/adjust/geoip2-golang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fgeoip2-golang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T12:32:30.848Z","updated_at":"2026-01-14T12:32:31.394Z","avatar_url":"https://github.com/adjust.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GeoIP2 Reader for Go #\n\n[![Build Status](https://travis-ci.org/oschwald/geoip2-golang.png?branch=master)](https://travis-ci.org/oschwald/geoip2-golang)\n[![GoDoc](https://godoc.org/github.com/oschwald/geoip2-golang?status.png)](https://godoc.org/github.com/oschwald/geoip2-golang)\n\nThis library reads MaxMind [GeoLite2](http://dev.maxmind.com/geoip/geoip2/geolite2/)\nand [GeoIP2](http://www.maxmind.com/en/geolocation_landing) databases.\n\nThis library is built using\n[the Go maxminddb reader](https://github.com/oschwald/maxminddb-golang).\nAll data for the database record is decoded using this library. If you only\nneed several fields, you may get superior performance by using maxminddb's\n`Lookup` directly with a result struct that only contains the required fields.\n(See [example_test.go](https://github.com/oschwald/maxminddb-golang/blob/master/example_test.go)\nin the maxminddb repository for an example of this.)\n\n## Installation ##\n\n```\ngo get github.com/oschwald/geoip2-golang\n```\n\n## Usage ##\n\n[See GoDoc](http://godoc.org/github.com/oschwald/geoip2-golang) for\ndocumentation and examples.\n\n## Example ##\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/oschwald/geoip2-golang\"\n    \"log\"\n    \"net\"\n)\n\nfunc main() {\n    db, err := geoip2.Open(\"GeoIP2-City.mmdb\")\n    if err != nil {\n            log.Fatal(err)\n    }\n    defer db.Close()\n    // If you are using strings that may be invalid, check that ip is not nil\n    ip := net.ParseIP(\"81.2.69.142\")\n    record, err := db.City(ip)\n    if err != nil {\n            log.Fatal(err)\n    }\n    fmt.Printf(\"Portuguese (BR) city name: %v\\n\", record.City.Names[\"pt-BR\"])\n    fmt.Printf(\"English subdivision name: %v\\n\", record.Subdivisions[0].Names[\"en\"])\n    fmt.Printf(\"Russian country name: %v\\n\", record.Country.Names[\"ru\"])\n    fmt.Printf(\"ISO country code: %v\\n\", record.Country.IsoCode)\n    fmt.Printf(\"Time zone: %v\\n\", record.Location.TimeZone)\n    fmt.Printf(\"Coordinates: %v, %v\\n\", record.Location.Latitude, record.Location.Longitude)\n    // Output:\n    // Portuguese (BR) city name: Londres\n    // English subdivision name: England\n    // Russian country name: Великобритания\n    // ISO country code: GB\n    // Time zone: Europe/London\n    // Coordinates: 51.5142, -0.0931\n}\n```\n\n## Testing ##\n\nMake sure you checked out test data submodule:\n\n```\ngit submodule init\ngit submodule update\n```\n\nExecute test suite:\n\n```\ngo test\n```\n\n## Contributing ##\n\nContributions welcome! Please fork the repository and open a pull request\nwith your changes.\n\n## License ##\n\nThis is free software, licensed under the ISC license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fgeoip2-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadjust%2Fgeoip2-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fgeoip2-golang/lists"}