A simple api built using Golang 1.4.x
- Golang 1.4.x
- Docker
- MySQL
- Unit Testing
# Docker Desktop for Mac
https://download.docker.com/mac/stable/Docker.dmg
# Docker Desktop for Windows
https://download.docker.com/win/stable/Docker%20Desktop%20Installer.exe
# Verify it
docker version
# Build the project
docker-compose build
# Launch the project
docker-compose up
# RESTFul Api
http://localhost:8080/api
# Verify it
http://localhost:8080/ping
# Swagger
http://localhost:8080/swagger/index.html
# Launch MySQL
docker-compose -f docker-compose.testing.yml up
Run them directly from GoLand.
Or from the terminal, in the solution root, simply run:
# Go to Friend Commands folder
cd backend/src/commands/friend
# Run all tests
go test
# Run all tests with coverage
go test -cover