Get support for sagikazarmark/modern-go-application
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
sagikazarmark/modern-go-application
Modern Go Application
Go application boilerplate and example applying modern practices
This repository tries to collect the best practices of application development using Go language. In addition to the language specific details, it also implements various language independent practices.
Some of the areas Modern Go Application touches:
- architecture
- package structure
- building the application
- testing
- configuration
- running the application (eg. in Docker)
- developer environment/experience
- telemetry
To help adopting these practices, this repository also serves as a boilerplate for new applications.
Features
- configuration (using spf13/viper)
- logging (using logur.dev/logur and sirupsen/logrus)
- error handling (using emperror.dev/emperror)
- metrics and tracing using Prometheus and Jaeger (via OpenCensus)
- health checks (using AppsFlyer/go-sundheit)
- graceful restart (using cloudflare/tableflip) and shutdown
- support for multiple server/daemon instances (using oklog/run)
- messaging (using ThreeDotsLabs/watermill)
- MySQL database connection (using go-sql-driver/mysql)
-
Redis connection (using gomodule/redigo)removed due to lack of usage (see #120)
First steps
To create a new application from the boilerplate clone this repository (if you haven't done already) into your GOPATH then execute the following:
chmod +x init.sh && ./init.sh
? Package name (github.com/sagikazarmark/modern-go-application)
? Project name (modern-go-application)
? Binary name (modern-go-application)
? Service name (modern-go-application)
? Friendly service name (Modern Go Application)
? Update README (Y/n)
? Remove init script (y/N) y
It updates every import path and name in the repository to your project's values. Review and commit the changes.
Load generation
To test or demonstrate the application it comes with a simple load generation tool. You can use it to test the example endpoints and generate some load (for example in order to fill dashboards with data).
Follow the instructions in etc/loadgen.
Inspiration
See INSPIRATION.md for links to articles, projects, code examples that somehow inspired me while working on this project.
License
The MIT License (MIT). Please see License File for more information.
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2