← ClaudeAtlas

go-code-stylelisted

Go coding conventions that follow established industry standards: Effective Go, the Go wiki's Code Review Comments, the Go Doc Comments guide, and the Google Go Style Guide (guide, decisions and best practices). Covers tooling, formatting, naming, packages and imports, errors, panics, declarations, control flow, functions, receivers, interfaces, generics, contexts, concurrency, global state, logging and doc comments. TRIGGER when: writing, editing, formatting, or reviewing Go code (.go files), or asked to "fix style" / "check code quality" in a Go project. DO NOT TRIGGER when: working in a non-Go language, or only reading code without making changes.
contrastiskey/eetc-claude-code · ★ 0 · Code & Development · score 62
Install: claude install-skill contrastiskey/eetc-claude-code
# Go Code Style Sources. Earlier ones win a disagreement: 1. The Go team's guides: [Effective Go](https://go.dev/doc/effective_go), [Go Code Review Comments](https://go.dev/wiki/CodeReviewComments) and [Go Doc Comments](https://go.dev/doc/comment). Effective Go dates from 2009: it predates modules, generics and error wrapping, and its `interface{}` is `any` today. 2. The [Google Go Style Guide](https://google.github.io/styleguide/go/): its [guide](https://google.github.io/styleguide/go/guide), [decisions](https://google.github.io/styleguide/go/decisions) and [best practices](https://google.github.io/styleguide/go/best-practices). Its Google-internal parts (Bazel, glog, the internal flag package) are left out. 3. The [Go release notes](https://go.dev/doc/devel/release), for language features and the versions that introduced them. Test rules live in `eetc:go-tests`. Project-specific commands live in the repo's CLAUDE.md. ## Principles In order of importance: **clarity** (the reader sees what the code does and why), **simplicity**, **concision** (a high signal-to-noise ratio), **maintainability**, **consistency**. Code is read far more often than it is written. - **Least mechanism.** Use a core language construct (slice, map, struct, channel, loop) when it's enough, then the standard library, then a dependency the repo already has. A `map[string]bool` is a set; don't add a set library. - **Local consistency.** A question this skill doesn