This is an opinionated Golang project template skeleton. Replace linode-obs/go_project_template with your project. Sometimes just go_project_template will need to be replaced. Also search TODO.
Make sure to write tests and pre-commit install
. You'll also want to install goreleaser and pre-commit. Note that the MIT license is included too.
Beware that:
- The Go version is set at
1.21
in golang-tests.yaml. This could be automated with renovate or dependabot - Markdown table of contents be nice to add, easy to create with an extension in your editor of choice
- Document your CLI values and metrics instrumented
Project description.
We recommend using a standard go project layout too.
Features:
- Feature 1
- Feature 2
Substitute {{ version }}
for your desired release.
wget https://github.com/linode-obs/go_project_template/releases/download/v{{ version }}/go_project_template_{{ version }}_linux_amd64.{deb,rpm}
{dpkg,rpm} -i go_project_template_{{ version }}_linux_amd64.{deb,rpm}
sudo docker run \
--privileged \
ghcr.io/linode-obs/go_project_template
wget https://github.com/linode-obs/go_project_template/releases/download/v{{ version }}/go_project_template_{{ version }}_Linux_x86_64.tar.gz
tar xvf go_project_template_{{ version }}_Linux_x86_64.tar.gz
./go_project_template/go_project_template
wget https://github.com/linode-obs/go_project_template/archive/refs/tags/v{{ version }}.tar.gz
tar xvf go_project_template-{{ version }}.tar.gz
cd ./go_project_template-{{ version }}
go build go_project_template.go
./go_project_template.go
- Merge commits to main.
- Tag release
git tag -a v1.0.X -m "message"
git push origin v1.0.X
goreleaser release
Contributions welcome! Make sure to pre-commit install