Skip to content
/ go-api-template Public template

Boilerplate of Go project for API server with Lint, Docker, Air, Gin, CI/CD, Git Hooks (Lefthook) and more.

Notifications You must be signed in to change notification settings

wiyco/go-api-template

Repository files navigation

go-api-template

Gin starter repository 🐢

Tech Stack

Environments Languages Linters Frameworks Testing CI/CD
docker-logo go-logo golangci-lint-logo
lefthook-logo
gin-logo go-logo githubactions-logo

Other

Development

  1. Linter
  2. Running the app

Linter

First, you need to install golangci-lint.

Please run the following script according to your environment:

Tip

Make sure that ~/go/bin is exist in PATH.

macOS

brew install golangci-lint

Windows & Linux

curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)/bin" v1.60.3

Important

For Windows, use Git Bash.

Running the app

Run with Docker to develop with live-reloading (hot-reload).

docker compose up

API route is localhost:8080 as the root.

About

Boilerplate of Go project for API server with Lint, Docker, Air, Gin, CI/CD, Git Hooks (Lefthook) and more.

Resources

Stars

Watchers

Forks