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 MacOS
Installing Go on Windows is actually very simple. Open Go's download page and download the MacOS 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 |
Open the package file you downloaded and follow the prompts to install Go. Accept the license agreement, click Next and proceed with the installation.
The package installs the Go distribution to /usr/local/go. The package should put the /usr/local/go/bin directory in yourPATH
environment variable. You may need to restart any
open Terminal sessions for the change to take effect.
After it has completed installing, let's test your setup next.
Testing the Installation
Once the installation finishes, it's time to check if Go was correctly installed in your system. To verify that you've installed Go by opening a command prompt and typing the following command:
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 MacOS. Not sure why you should learn Go? Check our main reasons to learn Go.