/template-go

🖨 Template for Golang projects @okp4.

Primary LanguageGoBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Golang Template

Template for golang projects @okp4.

version lint build test codecov conventional commits semantic-release Contributor Covenant License

Purpose & Philosophy

This repository holds the template for building Golang projects with a consistent set of standards accros all OKP4 projects. We are convinced that the quality of the code depends on clear and consistent coding conventions, with an automated enforcement (CI).

This way, the template promotes:

  • the use of conventional commits, semantic versioning and semantic releasing which automates the whole package release workflow including: determining the next version number, generating the release notes, and publishing the artifacts (project tarball, docker images, etc.)
  • unit testing
  • linting via golangci-lint
  • a uniformed way of building the project for several platforms via a Makefile using a docker image

How to use

🚨 do not fork this repository as it is a template repository

  1. Click on Use this template
  2. Give a name to your project
  3. Wait until the first run of CI finishes
  4. Clone your new project and happy coding!

Prerequisites

  • Be sure you have Golang installed.
  • Docker as well if you want to use the Makefile.

Build

make build