How to set up Go for Windows a quick and easy guide
Prerequisites
Hardware : Local Machine
To install Go on your machine, Click on the below link
Download the Go for Microsoft Windows.
![](https://prwatech.in/blog/wp-content/uploads/2021/03/1-24.jpg)
After downloading open the downloaded file and click next.
![](https://prwatech.in/blog/wp-content/uploads/2021/03/2-25.jpg)
Tick the Agreement and click Next.
![](https://prwatech.in/blog/wp-content/uploads/2021/03/3-19.jpg)
Give the Destination folder to install. Note the installation folder. We may need the installation path later. Click Next.
![](https://prwatech.in/blog/wp-content/uploads/2021/03/4-21.jpg)
Click Install.
![](https://prwatech.in/blog/wp-content/uploads/2021/03/5-18.jpg)
After installation click finish.
![](https://prwatech.in/blog/wp-content/uploads/2021/03/6-18.jpg)
Open the location where we installed the GO. Select the path and copy it.
![](https://prwatech.in/blog/wp-content/uploads/2021/03/8-21.jpg)
Now we have to set the environment variables. Search environment variable in search bar.
Click on Edit the system environment variables.
![](https://prwatech.in/blog/wp-content/uploads/2021/03/7-19.jpg)
A Click on Environment variables.
![](https://prwatech.in/blog/wp-content/uploads/2021/03/9-19.jpg)
Click on new.
![](https://prwatech.in/blog/wp-content/uploads/2021/03/10-11.jpg)
Give variable name as GoPath and paste the path of Go in variable value area. Then press OK.
![](https://prwatech.in/blog/wp-content/uploads/2021/03/11-11.jpg)
Now press ok
![](https://prwatech.in/blog/wp-content/uploads/2021/03/12-11.jpg)
Search for Command prompt and open it.
![](https://prwatech.in/blog/wp-content/uploads/2021/03/13-9.jpg)
type $
go version
![](https://prwatech.in/blog/wp-content/uploads/2021/03/version.jpg)
Install Visual Studio Code.
Click on below link to open VS Code Installation guide.
After Installing, open VS code -- click File >New File
![](https://prwatech.in/blog/wp-content/uploads/2021/03/vs2.jpg)
Write a sample code and save it. File extension should be .go
![](https://prwatech.in/blog/wp-content/uploads/2021/03/pg1-1.jpg)
Now open the command promt
Type the code below to change the directory into the installed folder.
$ cd <file path>
$ go run <filename>.go
then press Enter
![](https://prwatech.in/blog/wp-content/uploads/2021/03/h1.jpg)
It will give the output.