https://github.com/okp4/template-go
🖨 Template for Golang projects @okp4.
https://github.com/okp4/template-go
golang open-source template-repository
Last synced: 26 days ago
JSON representation
🖨 Template for Golang projects @okp4.
- Host: GitHub
- URL: https://github.com/okp4/template-go
- Owner: okp4
- License: bsd-3-clause
- Created: 2022-04-27T07:41:40.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-25T09:18:20.000Z (about 1 year ago)
- Last Synced: 2024-11-04T17:47:19.755Z (6 months ago)
- Topics: golang, open-source, template-repository
- Language: Go
- Homepage:
- Size: 249 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - okp4/template-go - 🖨 Template for Golang projects @okp4. (Go)
README
# Golang Template
> Template for golang projects @okp4.
[](https://github.com/okp4/template-go/releases)
[](https://github.com/okp4/template-go/actions/workflows/lint.yml)
[](https://github.com/okp4/template-go/actions/workflows/build.yml)
[](https://github.com/okp4/template-go/actions/workflows/test.yml)
[](https://codecov.io/gh/okp4/template-go)
[](https://conventionalcommits.org)
[](https://github.com/semantic-release/semantic-release)
[](https://github.com/okp4/.github/blob/main/CODE_OF_CONDUCT.md)
[](https://opensource.org/licenses/BSD-3-Clause)## Purpose & Philosophy
This repository holds the template for building Golang projects with a consistent set of standards accros all [OKP4](https://github.com/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](https://www.conventionalcommits.org/en/v1.0.0/), [semantic versioning](https://semver.org/) and [semantic releasing](https://github.com/cycjimmy/semantic-release-action) 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](https://github.com/golangci/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](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template)
1. Click on [Use this template](https://github.com/okp4/template-go/generate)
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](https://go.dev/doc/install) installed.
- [Docker](https://docs.docker.com/engine/install/) as well if you want to use the Makefile.## Build
```sh
make build
```