This project is a sample api in Golang created to help beginners in this tool.
1 - govendor init: create vendor path.
2 - govendor add +external: Add, inside vendor path, the dependencies.
Run the command bellow, inside /cmd path. This command will create a binary file from a Go program.
go build main.go
./main
or simply
docker-compose up
Request:
http://localhost:8890/api/v1/version/
Response:
{
"codResponse":"201",
"Message":"I'm Ok",
"version":{
"major":"1",
"minor":"0",
"patch":"0"
}
}
1 - Change the verb HTTP to POST
2 - Add the endpoint:
- http://localhost:8890/api/v1/process/
3 - Access the aba named Body
Request:
{
"code": 1,
"name": "Name"
}
Response:
{
"codResponse":"201",
"Message":"Process done...",
"object":{
"code":1,
"name":"Name"
}
}
This project is a sample api in Golang and open source software licensed as MIT.


