How Do You Structure Your Go Apps?
summary
Compares flat, layered and modular layouts and shows a working Go beer‑review API (GET/POST beers and reviews) implemented with in‑memory and JSON storage plus a separate data populate command; finds the naïve flat file hits ~92 lines for five endpoints and becomes unmanageable. Advocates grouping by domain‑driven design and enforcing inward dependencies with hexagonal architecture, using top‑level commands and package layout so services are testable, swappable and extendable; references go build template and no framework.
AI-written summary · about
chapters (8)
- 0:00Introduction and motivation
- 3:57Defining good structure
- 10:56Flat project structure
- 14:41Layered architecture
- 18:03Modular grouping
- 20:09Domain-driven design
- 32:13Hexagonal architecture
- 37:35Best practices and conclusion
related talks
44mHow Do You Structure Your Go Apps?
33mProject layout patterns in Go
06mBuilding Server Side API Architecture
46mWhy you can't use GO! (away from anti-patterns)
34mWriting idiomatic Go using Domain Driven Design
28mSOLID Go Design
30mFrom Chaos to Domain Driven Design
49mExploring domain driven design in Go
