The implementation using ECHO web framework
-
For MAC: go/MAC
-
For Windows: go/Windows
-
For Linux: go/Linux
- Clone repository
go mod download
-
Migration system
Migrations will executation with gormigrate.
gormigrate working together gorm for execute migrations-
Execute initial migrations
go run run-migrations.go
-
Create a new migration
You'll add a new file in folder /migration. File name will migration id.
-
-
Run app
-
In terminal
go run src/main.go
-
Or application Debugging for VSCODE.
Install extension golang for VSCODE. In launch.json set your envs.
Click F5 and add your breakpoints. -
Or run in docker.
Docker compose will create postgres db and its application.docker-compose up
-
-
Run Unit tests
- In terminal
go test ./test/unit/... -race -covermode=atomic -v -coverpkg=./src/... -coverprofile=coverage.out
- In terminal
-
Run Integration tests
- In terminal
go test ./test/integration/... -race -covermode=atomic -v -coverpkg=./src/... -coverprofile=coverage.out
- In terminal
-
Run All tests
- In terminal
go test ./test/... -race -covermode=atomic -v -coverpkg=./src/... -coverprofile=coverage.out
- In terminal
-
Export (HTML) collection coverage
- In terminal
go tool cover -html=coverage.out -o=coverage.html
- In terminal
If you've ever wanted to contribute to open source, and a great cause, now is your chance!
See the contributing docs for more information
JP. Nobrega 💬 📖 👀 📢 |