A community-driven reference for structuring Go applications with common directory patterns and best practices.
Project Layout is a reference repository that documents common directory structures and organizational patterns for Go applications. It helps developers create maintainable, scalable projects by providing a blueprint for separating code, configurations, and assets. While not an official standard, it aggregates community best practices to reduce ambiguity in project organization.
Go developers working on medium to large projects, especially teams needing consistent structure for collaboration or open-source maintainers ensuring their code is easily consumable by others.
It saves time and reduces decision fatigue by offering a battle-tested starting point, avoiding messy codebases as projects grow. The layout is flexible, allowing teams to adopt only what they need while benefiting from community-vetted patterns.
Standard Go Project Layout
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Defines clear purposes for common directories like /cmd for main apps, /internal for private code, and /pkg for public libraries, reducing ambiguity as projects scale, as detailed in the README sections.
Includes dedicated directories for scripts, configs, deployments, and testing, supporting build automation and continuous integration workflows, referenced in the /build and /scripts sections.
Encourages contributions to refine patterns based on real-world usage, ensuring the layout evolves with the Go ecosystem, as stated in the overview and community notes.
Intentionally generic, allowing teams to adapt the layout by keeping only needed directories, emphasized in the README's philosophy and overview.
Not an official Go standard, so it lacks enforcement and might conflict with other guidelines, requiring teams to make independent adoption decisions, as the README explicitly warns.
Can introduce unnecessary complexity for small projects; the README admits it's overkill for PoCs or simple apps, potentially leading to unused directories and bloated structure.
Some patterns like the /pkg directory are not universally accepted in the Go community, as noted in the README, which can cause confusion or inconsistency in team discussions.