Why to choose GO?
Go or Golang is a multi-purpose language and can be used in different areas. But, there are some use cases that Go shines in there:
- Concurrency: While developing Golang, this was kept in mind. Golang has a concept of goroutines, which is a lightweight thread managed by Go runtime
- Standard Library: Go has an amazing standard library that provides a huge range of convenient and easy-to-use built-in functions and packages. So there is no need for an extra dependency.
- Networking: Go can have high-quality parsing libraries that are easy to plug into other libraries. It is excellent for writing networking applications.
Before installing Go, you need to download it. For that, all the version of Go are available at golang.org
Download the Golang according to your system architecture and follow the further instructions for the installation of Golang.
To make things simple, use the default installation path at
C:\Go . You will see GO named folder inside your C drive.
Now set the environment variables. Right click on My PC and select Properties. Choose the Advanced System Settings from the left side and click on Environment Variables as shown in the below images.
Click on Path from the system variables and then click Edit. Then Click New and then add the Path with bin directory where you have pasted the Go folder. Here we are editing the path C:\go\bin and click Ok as shown in the images.
Now create a new user variable which tells Go command where Golang libraries are present. For that click on New on User Variables.
Now fill the Variable name as GOROOT and Variable value is the path of your Golang folder. So here Variable Value is C:\go\. After Filling click OK.
After that Click Ok on Environment Variables and your setup is completed. Now Let’s check the Golang version by using the command
go version on command prompt.
I hope it helps You.