📝 Edit page
➕ Add page
Structure
Explaining layout that this project follows, which is best practice
Template projects
Templates in golang-standards
on GitHub:
- Project layout - very simple
- Project template - very detailed
Project layout
cmd/
- Entrypoint. Code can be minimal here.pkg/
- Code to be imported in other projects (directory is optional).internal/
- Code that is used only for the project.go.mod
- Declare a go module at the root of your project.
See .gitignore of the official template.