Idiomatic Go Tells a Story
summary
A concrete practice for turning good Go into idiomatic Go: arrange packages as horizontal packages by placing type definitions next to their methods instead of a shared model or utils package, name functions by verbs then infer the noun, prefer short receivers like t, collapse single‑use variables into one line, and put interfaces in the caller package so the consumer owns the interface. These steps reduce noise, make tests and refactors easier, and let packages swap implementations without rewrites.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:52Meaningful packages
- 3:16Story outline and structure
- 6:09Naming Go types
- 8:15Paragraph structure in functions
- 12:28Single-use variables problem
- 15:19Refactoring codebases
- 16:42Consumer-owned interfaces
- 19:09Hero’s journey in Go
- 20:33Conclusion and key takeaways
related talks
28mIdiomatic Go Tricks
39mWriting Beautiful Packages in Go
34mWriting idiomatic Go using Domain Driven Design
20mBuilding Better Packages
36mThings I Find Myself Repeating About Go
03h 48mWorkshop: Practical Go
44mHow Do You Structure Your Go Apps?
17mFrom Java to Go: I Have a Hammer and See Nails Everywhere
