Skip to content

Starter template to quickly scaffold a modern web service in Go

License

Notifications You must be signed in to change notification settings

binjamil/go-starter

Repository files navigation

Go Starter

This template can be used as a starting point for developing modern web services in Go.

Features

  • Business logic decoupled via domain in internal directory
  • Dependency injection employed to make testing easier
  • Environment-specific configuration files in config directory
  • Auto-generated OpenAPI docs by running make docs
  • Ent, a rich, type-safe ORM that supports auto-migrations

Prerequisites

Running locally

Set up dependencies

make compose-up

Run API server

make run

Server will be live now on http://localhost:8080
Swagger API documentation will be live on http://localhost:8080/swagger/index.html

Tear down dependencies

make compose-down

Generate ent code

make ent

Click here to find more about ent

Run tests

make test