docs: idiomatic Go patterns from stdlib + Kubernetes with source citations

This commit is contained in:
Rodin
2026-04-30 11:07:33 +00:00
parent 0f1d7e4c06
commit c797178fb9
6 changed files with 2184 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
# Go Patterns
Idiomatic Go patterns extracted from the [Go standard library](https://github.com/golang/go) and [Kubernetes](https://github.com/kubernetes/kubernetes) source code with verified file:line citations.
## Structure
- `patterns/` — Go stdlib patterns (interfaces, errors, concurrency, structs, testing, docs, style, API conventions, packages)
- `kubernetes/` — Production-scale patterns from Kubernetes (controllers, informers, workqueues)
- `comparison/` — stdlib vs Kubernetes patterns
- `smells/` — Anti-patterns and common Go mistakes
- `changelog/` — Daily digest of merged PRs
## Philosophy
These rules are derived from what the Go source code 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.