-
install prerequisites
- mandatory: gofumpt, golangci-lint and goreleaser
go install mvdan.cc/gofumpt@latest go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest go install github.com/goreleaser/goreleaser/v2@latest
- optional and recommended: pre-commit
pip install pre-commit
-
export this template to a new project folder
./scripts/export.sh <target-project-name> [target-project-owner]
-
in new project folder
- to format, lint, build and test:
./scripts/all.sh
-
verify, commit and push everything to the new git repository
-
optional install pre-commit hook
pre-commit install pre-commit install --hook-type commit-msg
- create a release
./scripts/release.sh <version>
this updates the
Versionin "pkg/common/about.go", generates the docs in "docs" and commits and pushes the changes using the commit message "release: ".A "v" tag is then created and pushed, which triggers the release workflow from .github/workflows/release.yaml.
This release workflow then creates the binaries and archives for the configured OS/Arch combinations, as well as a multi-platform docker image. If the later is not needed, the “Dockerfile” can be removed, as well as the "docker" and "docker_manifests" sections in ".goreleaser.yaml"
-
Notifications
You must be signed in to change notification settings - Fork 0
my template for go projects
License
gms1/go-project-template
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|