This post provides different project layout types for organizing code in Go. It discusses the flat structure, grouping by function (anti-pattern), grouping by module (anti-pattern), and grouping by context using Domain Driven Design (DDD) and Hexagonal Architecture. The post recommends considering the specific requirements of the project and maintaining consistency while organizing code in Go.

9m read timeFrom hackernoon.com
Post cover image
Table of contents
Flat StructureAnti Pattern: Group by Function (Layered Architecture)Anti Pattern: Group by ModuleGroup by Context (Domain Driven Design)Group by Context (Domain Driven Design + Hexagonal Architecture)Conclusion

Sort: