Setting Up Go Development Environment

Mac OS

  1. Install Homebrew if you do not already have it
  2. Install Go via Homebrew (brew update && brew install golang). This will install the latest version of Go on your device. You can check your Go version by running go version. To install the pinned version for this book, you can download it from golang.org by running go get golang.org/dl/go1.15 to fetch the repository and go1.15 download to install it to your $GOPATH.
  3. Install Docker for Mac Desktop application using Docker documentation
  4. Git comes preinstalled with MacOS, however, you need to ensure that your tools are up to date by running: xcode-select --install. You can also install git via Homebrew: brew install git
  5. Make comes preinstalled with MacOS, however, you need to ensure that your tools are up to date by running: xcode-select --install. You can also install make via Homebrew: brew install make.

Linux (Ubuntu 18.04)

  1. Update apt-get (apt-get update)
  2. Download Go from golang.org and follow the installation instructions. This will install the latest version of Go on your device. You can check your Go version by running go version. To install the pinned version for this book, you can download it from golang.org by running go get golang.org/dl/go1.15 to fetch the repository and go1.15 download to install it to your $GOPATH.
  3. Install Docker Engine Community using the Docker Installation Guide
  4. Install Git: apt-get install git, git --version
  5. Make should already be installed