{"id":25895276,"url":"https://github.com/igorhalfeld/lagoinha","last_synced_at":"2025-03-02T22:30:21.470Z","repository":{"id":57481457,"uuid":"173813992","full_name":"IgorHalfeld/lagoinha","owner":"IgorHalfeld","description":"Library to get full address of a Brazilian zip code","archived":false,"fork":false,"pushed_at":"2024-05-21T17:46:50.000Z","size":2416,"stargazers_count":70,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-12T19:44:01.169Z","etag":null,"topics":["go","golang"],"latest_commit_sha":null,"homepage":"","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/IgorHalfeld.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-04T20:11:18.000Z","updated_at":"2024-09-25T00:36:33.000Z","dependencies_parsed_at":"2024-06-20T08:19:28.128Z","dependency_job_id":"040368d5-b2e2-404e-84fc-a864f1a93338","html_url":"https://github.com/IgorHalfeld/lagoinha","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorHalfeld%2Flagoinha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorHalfeld%2Flagoinha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorHalfeld%2Flagoinha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgorHalfeld%2Flagoinha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IgorHalfeld","download_url":"https://codeload.github.com/IgorHalfeld/lagoinha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241582499,"owners_count":19985845,"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"],"created_at":"2025-03-02T22:30:20.383Z","updated_at":"2025-03-02T22:30:21.451Z","avatar_url":"https://github.com/IgorHalfeld.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.png\" width=\"100px\" /\u003e\n  \u003ch3 align=\"center\"\u003e\n    Lagoinha\n  \u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n  \tLibrary to get full address of a Brazilian zip code. \u003cbr /\u003e\n\t  Works with VipCep, Correios, and many more.\n  \u003c/p\u003e\n\u003c/p\u003e\n\n---\n\n\u003ca href='https://github.com/jpoles1/gopherbadger' target='_blank'\u003e![gopherbadger-tag-do-not-edit](https://img.shields.io/badge/Go%20Coverage-16%25-brightgreen.svg?longCache=true\u0026style=flat)\u003c/a\u003e\n\nLagoinha is a package that uses APIs to find complete addresses by a provided zip code. The lib dispatches several requests at the same time and returns with the one that finished first.\n\n### Por que esse nome\n\nIt's a Brazilian meme [vídeo](https://www.youtube.com/watch?v=C1Sd_RWF5ks)!\n(onde é que eu tô, lagoinha, CEP, endereço...)\n\n### Install\n\n```sh\ngo get -u https://github.com/IgorHalfeld/lagoinha.git\n```\n\n### How to use\n\n```golang\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/igorhalfeld/lagoinha\"\n)\n\nfunc main() {\n\t// get amount of cep providers enabled\n\tfmt.Println(\"Total amount of cep providers:\", lagoinha.GetTotalAmountOfCepProviders())\n\n\t/*\n\t// if you want to use without handling channels\n\taddr, err := lagoinha.GetAddressSync(\"15809240\", \u0026lagoinha.GetAddressOptions{\n\t\tPreferenceForAPI: \"Apicep\",\n\t})\n\t*/\n\n\tchResp, chErr := lagoinha.GetAddress(\"04568000\")\n\n\tselect {\n\tcase address := \u003c-chResp:\n\t\tfmt.Printf(\"Response: %+v\\n\", address)\n\tcase err := \u003c-chErr:\n\t\tfmt.Printf(\"Error: %+v\\n\", err)\n\t}\n}\n```\n\nand you can also set a preference api\n\n```golang\nchResp, chErr := lagoinha.GetAddress(\"04568000\", \u0026lagoinha.GetAddressOptions{\n\tPreferenceForAPI: \"ViaCEP\",\n})\n```\n\nlogo by [@nelsonsecco](https://twitter.com/nelsonsecco)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorhalfeld%2Flagoinha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorhalfeld%2Flagoinha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorhalfeld%2Flagoinha/lists"}