d73c81dab111bb6828c3349a447b6c9d6c9ed1ba
Covers nil-check-after-use, goroutine leaks, interface pollution, stuttering names, init() abuse, ignored errors, interface-returning constructors, mutex value copying, channel misuse, and premature abstraction. Each entry includes BAD/GOOD examples, trigger conditions, and exceptions.
Go Patterns
Idiomatic Go patterns extracted from the Go standard library source code with verified file:line citations.
Structure
patterns/— Go stdlib patterns (interfaces, errors, concurrency, structs, testing, docs, style, API conventions, packages)smells/— Anti-patterns and common Go mistakeschangelog/— Daily digest of merged Go PRs
Philosophy
These rules are derived from what the Go standard library actually does, not opinions or blog posts. Every pattern cites specific files and line numbers.
When unsure how to do something in Go, look at how the standard library does it.
Languages
Markdown
100%