Installation process of GoLang:
The Go language is an open-source and platform-independent programming language. Many IDEs are available online to run your program; these online editors are the go playground, repl.it and many more. You can easily paste your code into their text editor and execute them.
But if you still want to install the go language on your PC or laptop, then, first of all, you have to fulfill some requirements. These requirements are as follows:
There are no specific hardware and software requirements necessary to install the Go language; you can easily install it on your system. All you need is a text editor to write your code and a go compiler to compile the program. Here are some tools that are given below, which will help you in writing the Go codes in the program:
- Windows notepad
- OS edit command
- VM or vi
- Notepad ++
- Sublime text (go sublime)
Now you need to follow the given steps one by one to successfully install the go language in your system. You can install the go language on almost every operating system, but the steps to install the go language will differ for every operating system. Here you will find the installation process for Windows.
On the Windows operating system: For the successful installation of go language on the Windows operating system, you need to follow all the steps, which are given below:
First of all, go to the official website of the go language.
You need to download the go file (EXE or MSI file) before starting the installation. You can download this EXE or MSI file from the official website of the go language. This website is:
Or you can simply click on the “Download Go” button, available on the main website; it will redirect you to the downloading page.
You can download the file as per your system’s requirements. You can download either a 32 bit or 64-bit GoLang MSI file. It totally depends on your system’s processor.
After downloading the zip file, you have to extract the file. In case if you want to change your installation folder, you can paste the extracted folder to your desired location.
Next, click on the setup file to install it. When you click on the setup file, it will redirect you to a new window setup, i.e., setup wizard. To proceed further, simply click on the “Next” button.
After clicking on the Next button, it will take you to the end-user license agreement section. Here, it will ask you to accept the terms and conditions of the GoLang. Again click on the “Next” button.
Now it will show you the directory path, where it will be installed. You can change the path by clicking on the change button, but by default, it will be installed in the C drive. If you are okay with the path, then click on the “Next” button to proceed.
After clicking on the Next button, it will take you to the main installation process. Click on the “Install” button to begin the installation of the Go language.
Please wait for a minute; it will take some time to install the go language.
Now that you are done with the installation process of the go language, press on the Finish button available in the setup wizard to complete the process.
Check your Go Version:
If you want to check the version of your go language, then follow the steps given below:
In the windows operating system, click on the window icon (start menu) of your PC.
In the search bar, type “cmd” and press the enter key.
When you press on the enter key, it will redirect you to the system’s command prompt.
In this command prompt; type the following command to check your go version:
After you type the given command exactly in the same way, press the enter key.
Here it will display the version of your go language.
Set the Environment variable:
After the successful installation of the go language, you need to set the environment variable to run your go programs.
Although the go installer will automatically set it, sometimes it fails to add the path into it. So here is the procedure to set the environment variable. Follow the given steps;
Firstly, right-click on “This PC” and go to the properties section,
When you click on the properties, it will redirect you to the control panel system section. Here all the basic information of your system will be shown.
In the left panel of this system section, there is an option of “Advanced system setting.” Click on that option.
When you click on the advanced system setting, a new window will pop up named “system properties.” In the system properties, click on the “environment variable” button, which is available at the bottom of the pop-up window.
Here again, a new pop window will arise named as an environment variable. Select the “path” option available in the system variable section and click on edit.
Click on the New button, add the path of the bin folder of the Go Language and press OK. Now your system variable is set.
After now, click on the New button available in the user variable section.
Next, provide the variable name (Any Name) and its value (the path of the go folder), followed by pressing OK to save it.
After providing the system variable and the user variable, finally, press OK to save it.
Thus, your environment variable is set properly, and you can easily run your code without any difficulty.