Organizing a Go module
Current official guidance on common module layouts for packages, commands, supporting packages, and multi-package repos.
Current official guidance on common module layouts for packages, commands, supporting packages, and multi-package repos.
- Author: Go Team
- Authority: primary
- Kind: guide
- URL: https://go.dev/doc/modules/layout
What it covers
- basic package layout
- basic command layout
- supporting packages and multi-package modules
Why authoritative
Current official Go documentation for module-era project layout.
Use when
- how should I organize a Go module
- should this Go repo use cmd or internal
- what is the official Go project layout guidance
Keywords
- module layout, project structure, cmd, internal, packages