Skip to content

ZideStudio/go-boilerplate

Repository files navigation

GoLang Boilerplate

This Go boilerplate provides a foundational structure for building applications with authentication already integrated.

Version

This boilerplate is built with Go version 1.24.3.

You can use GVM to manage your Go versions.

gvm install go1.24.3
gvm use go1.24.3

Environment Variables

Refer to the .env.model file to copy the necessary environment variables.

Database

This boilerplate uses PostgreSQL as the database. Ensure you have a PostgreSQL instance running and update the connection details in your .env file.

Dev Install

go install github.com/cosmtrek/air@latest
go get

Dev Start

set -o allexport; source .env; set +o allexport; air;

Test

All tests

go test ./... -v

Test specific package

go test ./[package]

Coverage

go test ./... --cover

Build

docker build -t goproject .
docker run -it --rm --name goproject goproject

Releases

Packages

Used by

Contributors

Languages