In this tutorial, we would be able to setup Go and write out first program.
In Windows
Download Go Installer package from here. Go ahead to install it depending on your OS. This would be a .msi file. Run the downloaded file.
By default the installer would install Go on your C drive at C:\Go. This is the default workspace
To check that Go installed correctly, open the command prompt and type the following command
go version
The would display the version of Go installed
In Mac
If you are using Mac, then open your terminal and install Go using the following command:
brew install golang
The default install location for Mac is /usr/local/go
In Linux
Download the and extract the archive into the folder /usr/local. So you will have a directory /usr/local/go
Add the /usr/local/go/bin to the PATH. To do that you need to execute the command:
export PATH=$PATH:/usr/local/go/bin
The confirm the installation using go version
Using an IDE
For me, I prefer using an IDE. In this case, the IDE for Go is the GoLand IDE developed by JetBrains. You can find it here
I think you can get a 30-trial version or a free version if you are student or teacher and want to use it for learning purposes. That is what I did! Once you have installed it, open it. It open the window as shown below:

Click on New Project and ensure that Go is selected in the GOROOT field as shown below.
Give the project a name. In this case, the name is awesomeProject2

Click on Create to create the Project. The new project window is opened as shown below:

Right-click on the project name and choose New > Go File. I name it firstProg. The file extension is .go.
Then enter the following code:
package main import "fmt" func main() { fmt.Println("Welcome to Go!") }
Next, right-click on the program and Choose “Run go build firstProg.go”. The program runs and displays the result in the output windows as shown below, circled in red:

Next Steps
Now that you have successfully setup Go programming IDE and run a Go program, let’s now delve into the Go Programming Tutorial proper!
So on to the next part: Basic Syntax of a Go Program.