Go Work Environment
This lesson addresses how compilation looks in the background, what a workspace is and what the basic folder structure of a Go environment is.
Workspace #
A folder structure with two directories at its root is typically is called a workspace. A typical Golang project keeps all its code in a single workspace. The workspace of Golang is:
- src, a folder that contains Go source code files
- bin, a folder that contains executable binaries (also called commands)
However, if you need external packages, there will also be a folder called pkg to accommodate these.
GOPATH variable
The workspace root location cannot be the same as the Go install location, and it is specified by the GOPATH ...