Template projects

Templates in golang-standards on GitHub:

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.