A template repository for a Go-based piece of software, to help you get started easily. https://opencommit.eu/blueprints/template-go
Find a file Use this template
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Martijn van der Kleijn 6c131ba878
All checks were successful
ci / ci (push) Successful in 0s
reuse / lint (push) Successful in 0s
ci / ci-1 (push) Successful in 23s
reuse / lint-1 (push) Successful in 5s
initial commit
Signed-off-by: Martijn van der Kleijn <martijn@opencommit.eu>
2026-09-18 17:25:23 +02:00
.forgejo/workflows initial commit 2026-09-18 17:25:23 +02:00
LICENSES initial commit 2026-09-18 17:25:23 +02:00
.gitignore initial commit 2026-09-18 17:25:23 +02:00
go.mod initial commit 2026-09-18 17:25:23 +02:00
main.go initial commit 2026-09-18 17:25:23 +02:00
main_test.go initial commit 2026-09-18 17:25:23 +02:00
README.md initial commit 2026-09-18 17:25:23 +02:00

template-go

OpenCommit template for new Go projects: a minimal, working Go starter with CI already wired up.

Getting started

  1. In OpenCommit: New Repository → Template.
  2. Pick OpenCommit Blueprints → template-go.
  3. Tick at least Git content to copy the repository files.
  4. Rename the module (see below) and push. Your first push runs the CI pipeline.

What's included

  • main.go / main_test.go — a minimal program with a passing test.
  • .forgejo/workflows/ci.yml — Go CI (build, vet, test) via the go-ci blueprint.
  • .forgejo/workflows/reuse.yml — REUSE compliance check via the reuse blueprint.
  • Go 1.26.8 toolchain, pinned in go.mod and the CI workflow.

Renaming the module

The module path is a placeholder (opencommit.eu/blueprints/template-go). Point it at your real module and update the imports:

go mod edit -module=opencommit.eu/your-user/your-repo

Workflows

The workflows in .forgejo/workflows/ are thin callers that subscribe to the blueprints by tag (uses: blueprints/workflows/...@v1). This keeps them small and upgrades easy — bump the pinned tag to upgrade.

If you prefer full autonomy with no cross-repository coupling, replace a caller with the standalone copy in blueprints/workflows/examples/, adjust, and commit.

Licensing

The OpenCommit Foundation suggests using the EUPL-1.2 license for your projects. This template ships EUPL-1.2 with placeholder copyright headers:

SPDX-FileCopyrightText: © 2026 Your Name Here <contact email>
SPDX-License-Identifier: EUPL-1.2

Replace Your Name Here with your own details in every file. The license text is provided in LICENSES/EUPL-1.2.txt. You are free to pick any other license instead — this is a suggestion, not a requirement.

Note — the upstream blueprints themselves are published under CC0-1.0 so they can be copied freely into any project, as they are here.