gocep

command module
v0.0.0-...-bc67e3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2017 License: BSD-2-Clause Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

goCep

Projeto em Golang para buscar dados do CEP e armazenar em cache

Compilar

Além de ter o Go instalado no sistema operacional é necessário executar:

export GOPATH=/path/goCep
go get -u github.com/golang/dep/cmd/dep
dep ensure
go build

Se você está compilando este projeto no Ubuntu, ou no Debian, verifique se você possuí uma das bibliotecas abaixo instaladas:

  • libcurl4-gnutls-dev
  • libcurl4-openssl-dev

Executar

O binário chamado goCep será criado. Basta executá-lo e ele ficará ouvindo na porta 3000 por novas requisições

Testando

Para rodar os tests, você pode executar:

go test

Uso

Basta acessar a URL como no exemplo abaixo

http://localhost:3000/cep/89201405

O retorno será um JSON com o conteúdo

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址