Setting up Go environment

less than 1 minute read

Go programs are organised into packages.

  • Package: a collection of source files in the same directory
  • Module: a collection of related Go packages.
  • Repository: contains one or more modules

Now we have to set up environment variables and add Go paths. To see all environment variables, you can do printenv. Otherwise, do echo $PATH.

echo $PATH


Let’s add Go paths.