Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pinebit/go-boilerplate
Golang server boilerplate
https://github.com/pinebit/go-boilerplate
boilerplate boilerplate-template golang server
Last synced: 10 days ago
JSON representation
Golang server boilerplate
- Host: GitHub
- URL: https://github.com/pinebit/go-boilerplate
- Owner: pinebit
- License: mit
- Created: 2023-05-22T14:35:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-23T09:31:12.000Z (over 1 year ago)
- Last Synced: 2024-06-21T19:03:52.220Z (5 months ago)
- Topics: boilerplate, boilerplate-template, golang, server
- Language: Go
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-boilerplate
[![Go](https://github.com/pinebit/go-boilerplate/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/pinebit/go-boilerplate/actions/workflows/go.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Docker Image](https://github.com/pinebit/go-boilerplate/actions/workflows/docker-image.yml/badge.svg?branch=main)](https://github.com/pinebit/go-boilerplate/actions/workflows/docker-image.yml)Golang server boilerplate.
## Motivation
To create a battle-tested server template that implements the most common best practices.
## Features
* Dockerfile
* TOML configuration with [go-toml](https://github.com/pelletier/go-toml)
* Structured logging with [zap](https://github.com/uber-go/zap)
* Graceful boot/shutdown with [go-boot](https://github.com/pinebit/go-boot)
* [Prometheus](https://github.com/prometheus/client_golang) metrics
* Simple HTTP server with [gin framework](https://github.com/gin-gonic/gin)
* Dependency injection with [dig](https://github.com/uber-go/dig)## Usage
1. Find and replace all "boilerplate" words for your product.
2. Building: `docker build .` or `make build`
3. Testing: `make test` and `make lint`
4. Running: `make run` or simply `go run .`