Skip to content

Commit

Permalink
feat: docs to i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorHalfeld committed May 21, 2024
1 parent b28bf6c commit 803ec4c
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,29 @@
Lagoinha
</h3>
<p align="center">
Utilitário Golang para busca por CEP integrado diretamente <br /> aos serviços dos Correios, ViaCEP e outros
Library to get full address of a Brazilian zip code. <br />
Works with VipCep, Correios and much more.
</p>
</p>

---

<a href='https://github.com/jpoles1/gopherbadger' target='_blank'>![gopherbadger-tag-do-not-edit](https://img.shields.io/badge/Go%20Coverage-16%25-brightgreen.svg?longCache=true&style=flat)</a>

Lagoinha é basicamente um pacote que usa a API dos Correios, ViaCep e outros para pegar o endereço com base em um CEP. O que o pacote faz, é disparar pra todas as APIs ao mesmo tempo e retornar com o resultado da primeira API que responder.
Lagoinha is a package that uses APIs to find complete addresses by a provided zip code. The packet dispatches several requests at the same time and returns with the one that finished first.

### Por que esse nome

É simples, veja o [vídeo](https://www.youtube.com/watch?v=C1Sd_RWF5ks)!
It's a Brazilian meme [vídeo](https://www.youtube.com/watch?v=C1Sd_RWF5ks)!
(onde é que eu tô, lagoinha, CEP, endereço...)

### Instalação
### Install

```sh
go get -u https://github.com/IgorHalfeld/lagoinha.git
```

### Como usar
### How to use

```golang
package main
Expand All @@ -40,11 +41,12 @@ func main() {
// get amount of cep providers enabled
fmt.Println("Total amount of cep providers:", lagoinha.GetTotalAmountOfCepProviders())

// if you want to use without handling channels
address, err := lagoinha.GetAddressSync("15809240", &lagoinha.GetAddressOptions{
/*
// if you want to use without handling channels
addr, err := lagoinha.GetAddressSync("15809240", &lagoinha.GetAddressOptions{
PreferenceForAPI: "Apicep",
})

*/

chResp, chErr := lagoinha.GetAddress("04568000")

Expand All @@ -57,7 +59,7 @@ func main() {
}
```

você também pode setar uma api de preferência
and you can also set a preference api

```golang
chResp, chErr := lagoinha.GetAddress("04568000", &lagoinha.GetAddressOptions{
Expand Down

0 comments on commit 803ec4c

Please sign in to comment.