golang-conventions

Installation
SKILL.md

Go Coding Conventions

Quick Reference

  • Go version: Use Go 1.21+ for modern features (generics, slices package, cmp)
  • Formatting: Use gofmt and goimports (automatic via gopls)
  • Linting: Use golangci-lint with comprehensive linters enabled
  • Testing: Table-driven tests, test fixtures, subtests with t.Run()
  • Error handling: Explicit, descriptive errors with errors.Is() and errors.As()

Core Principles

1. Simplicity and Clarity

  • Write clear, idiomatic Go code
  • Prefer simple solutions over clever ones
  • Follow the principle of least surprise
  • "Clear is better than clever" - Go Proverbs
Installs
6
First Seen
Feb 10, 2026
golang-conventions — rory-data/copilot