Set up the Go development environment
Install Git
- For Mac see Install Git on Macintosh
- For Windows see Install Git on Windows
Install the Go Programming Language
- Download the Go distribution from The Go Programming Language page and follow the installation instructions.
Test the Go installation
- Open a new terminal window, so the new PATH settings are imported, and execute
go version
Download a remote sample package
To download the package, in a terminal window execute
go get github.com/golang/example/hello
Navigate to the directory of the downloaded application
cd ~/go/bin
To run the package, execute
hello
Install the Go IDE
The Atom editor is a great IDE for Go. To enable the IDE features in Atom
-
- Start Atom
- Open the settings window
- On the Mac select the Preferences item in the Atom menu
- On Windows select the Settings item in the File menu
- On the Mac select the Preferences item in the Atom menu
- On the left side select Install
- Search for atom-ide-ui and install the package
- Search for ide-go and install the package
- Restart Atom