This repository contains the code for our fully featured go-template, from which we can start new Go projects.
- Logging: Structured logging with slog
- Configuration: Configuration management with koanf
- HTTP Server: HTTP server with net/http
- Database: DB ORM with ent
- Task Runner: Task runner with just
- Go >= 1.21.5
- redocly (generate API documentation)
- ent (DB ORM)
- goose (DB migrations tool)
- ogen (generate APIs)
- wire (dependency injection)
- just (task runner)
- Clone the repository
- Install the dependencies
go mod tidy
- Set up local environment variables using the
.env.example
file.
cp .env.example .env
- Run codegen
just # yes, that's it, nothing else
- Run the application
just run
Necessary for generating APIs, DB schemas, dependency injection, etc. A detailed explanation of the codegen process can be found here.
This repository contains a devcontainer configuration for Visual Studio Code. The devcontainer is pre-configured with all the necessary tools and extensions to start developing right away. A detailed explanation of the devcontainer can be found here.
Refer to the migrations documentation for more information on how to create and apply migrations.