Touch Go Blueprint 😸

A starter kit for Golang API project development

Feature

  • Company creation
  • Staff creation
  • Staff update
  • Get staff by company ID

System requirements Development

  • Docker
  • Jaeger
  • MongoDB

Prototype

Touch Go Blueprint

Api Specification

URL: example.swagger-api-touch.com

Pre-Require

Mockery

GO111MODULE=off go get github.com/vektra/mockery/.../

Swagger

go get -u github.com/swaggo/swag/cmd/swag
go get -u github.com/swaggo/gin-swagger
go get -u github.com/swaggo/files

Installation

git clone https://github.com/touchtechnologies-product/go-blueprint-clean-architecture
cd go-blueprint-clean-architecture
go mod download

Testing

unit testing command

  go test ./... -cover

integrating testing command

  go test ./... -tags integration

Generate Mocks

generate mocks from interfaces for unit testing

  go generate ./...

Local development

development in local start mongodb jaeger

cd development
source ./local.env
docker-compose up -d

Tracing with Jaeger

please see in the example code implement jaeger wrap service service/company/withtracer

Others

  • Uber golang style guide link
  • Practical Go: Real world advice for writing maintainable Go programs link