diff --git a/AGENTS.md b/AGENTS.md index 6b20eaf..8834768 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ ## Project overview -`devantler-tech/go-template` is a minimal Go template for bootstrapping new Go projects. It ships an empty, idiomatic scaffold (a no-op `main.go` entry point) plus the house tooling — linting, CI/CD, releases, and editor/agent configuration — so a new module can start from a clean, current baseline. The module path is `github.com/devantler-tech/go-template` and it targets Go 1.24 (CI/release runners use the latest 1.25.x toolchain). +`devantler-tech/go-template` is a minimal Go template for bootstrapping new Go projects. It ships an empty, idiomatic scaffold (a no-op `main.go` entry point) plus the house tooling — linting, CI/CD, releases, and editor/agent configuration — so a new module can start from a clean, current baseline. The module path is `github.com/devantler-tech/go-template`; the minimum Go version is whatever `go.mod` declares — the single source of truth, so it never drifts from this prose. That floor currently sits on the 1.25.x toolchain (raised from 1.24 because the reusable Dead Code Analysis check installs `deadcode`, which requires Go ≥ 1.25); the requirement is tooling-driven, not a language-feature need. ## Repository structure diff --git a/README.md b/README.md index 2f53a1e..b9a1d86 100644 --- a/README.md +++ b/README.md @@ -4,30 +4,39 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/devantler-tech/go-template)](https://goreportcard.com/report/github.com/devantler-tech/go-template) [![Go Reference](https://pkg.go.dev/badge/github.com/devantler-tech/go-template.svg)](https://pkg.go.dev/github.com/devantler-tech/go-template) -A simple Go template for new projects. +A minimal, batteries-included Go template for new projects. Skip the boilerplate — start from a clean, idiomatic scaffold with linting, CI/CD, releases, and agent tooling already wired up. -## Prerequisites +## ✨ What's included -- [Go](https://golang.org/dl/) +- **Idiomatic scaffold** — a no-op `main.go` plus the conventional `cmd/`, `internal/`, and `pkg/` layout, ready for your first package. +- **Linting & formatting** — [`golangci-lint`](https://golangci-lint.run/) v2 (formatters + `default: all` linters) in CI, with [MegaLinter](https://megalinter.io/) covering everything else. A [pre-commit](https://pre-commit.com/) hook runs `golangci-lint` formatting (and `mockery` mock generation) locally on commit. +- **CI/CD** — a required-checks workflow on pull requests and the merge queue, plus a [GoReleaser](https://goreleaser.com/) release pipeline (`cd.yaml`) triggered on `v*` tags. +- **Coverage** — `go test` coverage reported via [GitHub Code Quality](https://docs.github.com/code-security/code-quality). +- **Dependency management** — [Dependabot](https://docs.github.com/code-security/dependabot) keeps Go modules and pinned GitHub Actions current (daily). +- **Agent-ready** — [`AGENTS.md`](AGENTS.md) conventions and a `.claude/skills/maintain` card so the autonomous Daily AI Assistant (and any agentic tool) can maintain the repo. -## 🚀 Getting Started +The minimum Go version is declared in [`go.mod`](go.mod) — the single source of truth. -Clone the repository and initialize a new module to try the template locally. +## 🚀 Use this template + +Create a new repository from the template with the GitHub CLI: ```bash -git clone -cd -go mod init +gh repo create my-project --template devantler-tech/go-template --public --clone +cd my-project ``` -## 📝 Usage +Or click **Use this template** on the [repository page](https://github.com/devantler-tech/go-template). -### Initialize the module +Then point the module at your own path: ```bash +go mod edit -module github.com//my-project go mod tidy ``` +## 📝 Usage + ### Add a dependency ```bash @@ -51,3 +60,7 @@ go run ./ ```bash go test ./... ``` + +## 🤖 Maintenance + +This template is maintained by an autonomous AI assistant. The conventions, validation commands, and contribution workflow live in [`AGENTS.md`](AGENTS.md). diff --git a/cspell.json b/cspell.json index 13f0c48..6e0e992 100644 --- a/cspell.json +++ b/cspell.json @@ -12,6 +12,7 @@ "golines", "goreleaser", "gostd", + "megalinter", "swaggo", "testutils", "vektra"