GoLang
This is a playground for me to try new features in Go and to learn the language. It also provides me a basic template for new projects.
Code coverage is available with GitLab Pages at playground.dev.bella.ml/golang. Currently, no overall coverage is available as of #24570 therefore the following image should not provide any correct/useful information:
Download
Test binaries can be downloaded from GitLab Pages which are automatically updated with every commit.
Folder structure for Go
An extensive documentation can be found at Standard Go Project Layout on GitHub.
/cmd
This folder contains the main application(s) of this project.
The directory name for each application should match the name of the executable (e.g. /cmd/project
for project.exe
)
/internal
This folder contains packages which should not be shared and only be available by this project. For example, package dumbrandom
should be put into /internal/dumbrandom
.
/pkg
Library code that can be reused by external projects
This folder contains supporting tools for this project.
go.mod
This file defines the modules URL that is used for local imports. Also replaces dep
. Go 1.11+ is required for this to work.
Special folders and files used only in this project
The folder .vscode
should not be uploaded to your repo. This is only an example how the debugger in VS Code can start the program from cmd/project
. It is by default ignored with .gitignore
.