go-code-stylelisted
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