How to Install and Setup Go on Windows Platform

Installing Go on your system, setting up environment variables on your Windows System.

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

godoc.org

Download the Golang according to your system architecture and follow the further instructions for the installation of Golang.

STEP 1:

To make things simple, use the default installation path at C:\Go . You will see GO named folder inside your C drive.

STEP 2:

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.

Advanced system settings
Advanced system settings
Click on Advanced system settings
Environment Variables
Environment Variables
Click on Environment Variables

STEP 3:

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.

Set Path
Set Path
Set Path
Set Path

STEP 4:

Now create a new user variable which tells Go command where Golang libraries are present. For that click on New on User Variables.

User Variables
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.

GOROOT
GOROOT

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.

Golang version on command prompt
Golang version on command prompt

I hope it helps You.

2nd yearite || React.js || Golang