Skip to content
/ go-template Public template

An opinionated template for building REST APIs with Go

Notifications You must be signed in to change notification settings

SphericalKat/go-template

Repository files navigation

go-template

This repository contains the code for our fully featured go-template, from which we can start new Go projects.

Features

  • 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

Requirements

Quickstart

  1. Clone the repository
  2. Install the dependencies
go mod tidy
  1. Set up local environment variables using the .env.example file.
cp .env.example .env
  1. Run codegen
just # yes, that's it, nothing else
  1. Run the application
just run

Codegen

Necessary for generating APIs, DB schemas, dependency injection, etc. A detailed explanation of the codegen process can be found here.

Devcontainers

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.

Migrations

Refer to the migrations documentation for more information on how to create and apply migrations.

About

An opinionated template for building REST APIs with Go

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published