Installation of Go [Windows]

  • date 20th March, 2021 |
  • by Prwatech |
  • 0 Comments

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

https://golang.org/dl/

Download the Go for Microsoft Windows.

After downloading open the downloaded file and click next.

Tick the Agreement and click Next.

Give the Destination folder to install. Note the installation folder. We may need the installation path later. Click Next.

Click Install.

After installation click finish.

Open the location where we installed the GO. Select the path and copy it.

Now we have to set the environment variables. Search environment variable in search bar.

Click on Edit the system environment variables.

A Click on Environment variables.

Click on new.

Give variable name as GoPath and paste the path of Go in variable value area. Then press OK.

Now press ok

Search for Command prompt and open it.

 type $            go version 

Install Visual Studio Code.

Click on below link to open VS Code Installation guide.

https://prwatech.in/blog/software-installation/installation-of-visual-studio-code-windows/

After Installing, open VS code — click File >New File

Write a sample code and save it. File extension should be .go

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

It will give the output.

0
0

Quick Support

image image