Setting up the Go environment
This section will walk you through how to download and install Go on multiple platforms, how to build a simple Hello World application, and how to use an IDE to speed up your Go development. Along the way, you will become familiar with the Go commands that you will need to write Lambda functions in Go.
The runtime environment
Download the appropriate package for your operating system and architecture from the Go download page (https://golang.org/dl/):
- For macOS X: Download the
goVersion.darwin.amd64.pkg
file and follow the installation prompt. You may need to restart any open Terminal sessions for the change to take effect. - For Windows: Download the MSI installer and follow the wizard. The installer will set up environment variables for you.
- For Linux: Open a new terminal session and type the following commands (at the time of writing, the current version is 1.10):
curl https://golang.org/doc/install?download=go1.10.1.linux-amd64.tar.gz -O /tmp/go1.10.tar.gz
tar ...