What problem does it solve?
It helps you avoid messy Go repositories by providing a practical, conventions-based directory and module layout that scales from small tools to multi-binary services without over-engineering.
Core Features & Use Cases
- Architecture-first structuring: Prompts you to confirm the desired architecture and scope before choosing a layout, preventing premature complexity.
- Clear conventions for modules and packages: Enforces module naming rules (match repo URL, lowercase, hyphens) and package naming expectations to keep imports predictable.
- Correct placement of main vs logic: Ensures all
main packages live under cmd/ with minimal startup wiring, while business logic stays in internal/ or pkg/ as appropriate.
- Project-type specific guidance: Covers CLI tools, libraries, services, workspaces/monorepos, and testing placement rules (including
_test.go co-location and testdata/).
- Guardrails against common mistakes: Flags anti-patterns like using a Java-style
src/, generic folder names like utils/common, misplaced secrets, and incorrect config/log handling for services.
Quick Start
Ask the AI to propose a Go layout for your project by stating whether it is a CLI tool, library, or service, and what architecture and DI approach you prefer, then request a concrete cmd/ and internal/ directory plan plus the correct go.mod module path.