Awesome
Golang Gin Framework Fundamental
Example golang using gin framework everything you need, i create this tutorial special for beginner.
Feature
- Containerize Application Using Docker
- Protected Route Using JWT
- Integerasi ORM Database Using Gorm
- API Documentation Using Swagger
- Validation Request Using Go Playground Validator
- Integerasi Unit Testing
- And More
Command
-
Application Lifecycle
- Install node modules
$ go get . || go mod || make goinstall
- Build application
$ go build -o main || make goprod
- Start application in development
$ go run main.go | make godev
- Test application
$ go test main.go main_test.go || make gotest
-
Docker Lifecycle
- Build container
$ docker-compose build | make dcb
- Run container with flags
$ docker-compose up -d --<flags name> | make dcu f=<flags name>
- Run container build with flags
$ docker-compose up -d --build --<flags name> | make dcubf f=<flags name>
- Run container
$ docker-compose up -d --build | make dcu
- Stop container
$ docker-compose down | make dcd