{"id":19819086,"url":"https://github.com/dmitriiweb/go-ip-country","last_synced_at":"2025-07-11T10:36:50.693Z","repository":{"id":57691342,"uuid":"203242954","full_name":"dmitriiweb/go-ip-country","owner":"dmitriiweb","description":"An offline tool to get country by IP","archived":false,"fork":false,"pushed_at":"2019-08-19T20:15:10.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T08:16:41.509Z","etag":null,"topics":["go","golang","ip","ipv4"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmitriiweb.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":"2019-08-19T20:09:20.000Z","updated_at":"2019-08-19T20:36:59.000Z","dependencies_parsed_at":"2022-09-26T20:41:46.193Z","dependency_job_id":null,"html_url":"https://github.com/dmitriiweb/go-ip-country","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriiweb%2Fgo-ip-country","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriiweb%2Fgo-ip-country/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriiweb%2Fgo-ip-country/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriiweb%2Fgo-ip-country/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmitriiweb","download_url":"https://codeload.github.com/dmitriiweb/go-ip-country/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241175339,"owners_count":19922484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["go","golang","ip","ipv4"],"created_at":"2024-11-12T10:17:45.670Z","updated_at":"2025-02-28T15:31:39.654Z","avatar_url":"https://github.com/dmitriiweb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ip-country\nAn offline tool to get country by IP\n\n\n## Requirements\n- IP2Location™ LITE IP-COUNTRY-REGION-CITY Database\n\n## Installation\n\n1. Download IP2Location database for IPv4 from [https://lite.ip2location.com/database/ip-country-region-city](here)\n\n2. Install:\n\n   ```\n   go get https://github.com/dmitriiweb/go-ip-country\n   ```\n\n   \n\n## Usage\n\n```\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/dmitriiweb/ip_country\"\n)\n\n\nfunc main() {\n\tpath := \"/home/di/Downloads/ips.csv\"\n\tips := []string{\"5.34.169.32\", \"4.69.200.225\"}\n\n\tres := ipCountry.GetIPData(ips, path)\n\tfor _, row := range res {\n\t\tfmt.Printf(\"IP: %s\\nCountry: %s\\nCity: %s\\n\\n\", row.IP, row.CountryName, row.CityName)\n\t}\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriiweb%2Fgo-ip-country","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitriiweb%2Fgo-ip-country","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriiweb%2Fgo-ip-country/lists"}