So you're
ready to learn Go and
need some help installing it on Windows? Sure, let's get started! On this
tutorial let's learn how to install it on Windows.
Downloading Go for Windows
Installing Go on Windows is actually very simple. Open Go's download page and download the Windows installer. Since Go's follows a frequent release schedule, it may be more up to date than this. Click on the installer to download it (in our example, go1.15.3.windows-amd64.msi):
The Go installer for MacOS |
Now run the installer. Accept the license agreement, click Next and proceed with the installation.
By default the installer installs Go in C:\Go. You can change the location as needed but since that's a pretty standard setup, we recommend leaving it there. After installing, you will need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt.
After it has completed installing, click Finish to complete the setup. We'll
test your setup next.
Testing the Installation
Once the installation finishes, it's time to check if Go was correctly installed in your system. Open a command prompt (Start -> Command Prompt) and type:
If you see a message like the below, it's because Go was installed
successfully.
Testing GOPATH
Let's now test if the GOPATH environment variable was correctly set (it should) with:
You should see something like:
Congratulations! You have go installed in your system!
Conclusion
On this quick tutorial we learned how simple it is to install Go on Windows. Not sure why you should learn Go? Check our main reasons to learn Go.