Before, we start with the process of Installing Golang on our System. We must have first-hand knowledge of What the Go Language is and what it actually does? Go is an open-source and statically typed programming language developed in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson at Google but launched in 2009. It is also known as the Golang and it supports the procedural programming language. It was initially developed to improve programming productivity of the large codebases, multicore, and networked machines. Golang programs can be written in any plain text editor like TextEdit, Sublime Text, or anything of that sort. One can also use an online IDE for writing Golang codes or can even install one on their system to make it more feasible to write these codes. Using an IDE makes it easier to write Golang codes because IDEs provide a lot of features like intuitive code editor, debugger, compiler, etc. In this article, we have covered the following topics:
Steps for Installing Golang on MacOS
Step 1: Checking if Go is installed or not. Before we begin with the installation of Go, it is good to check if it might be already installed on your system. To check if your device is preinstalled with Golang or not, just go to the Terminal and run the command:
go version
If Golang is already installed, it will generate a message with all the details of the Golang version available as shown below, otherwise, it will give an error. 




Setting up the Go Workspace
After successfully installing Go on your system, now we are going to set up the Go workspace. Go workspace is a folder on your computer where all your go code will going to store. Step 1: Creating a folder named as Go in documents(or wherever you want in your system) like as shown in the below image: 
cd ~
After that set path of the folder using the following command:
echo "export GOPATH=/Users/anki/Documents/go" >> .bash_profile
Here, we are adding export GOPATH=/Users/anki/Documents/go to .bash_profile. The .bash_profile is a file that automatically loaded when you logged into your Mac account and it contains all the startup configurations and preferences for your command-line interface(CLI). 
cat .bash_profile

echo $GOPATH
Creating first Golang program
Step 1: Download and install a text editor according to your choice. After installation, create a folder named go(or whatever name you want) in Documents(or wherever you want in your system). In this folder, create another folder named as source and in this source folder create another folder named as welcome. In this folder, all your go programs are going to be stored. 

go run name_of_the_program.go
