I had the problem that I had to work with Windows, where I don’t have admin rights and therefore couldn’t install anything without admin rights. However, when you download the Windows .msi file from GO, you need it for the installation. So you have to do this with the ZIP file and install GO in the user home directory.
You can download the ZIP file here. Then unzip it in Windows. You need to find a path in your home directory where you want to install it. I found it best to do this where other software is already installed in the home directory. This is: C:\Users\<username>\AppData\Local\Programs
Copy the go folder from the archive to this location so that you then have C:\Users\<username>\AppData\Local\Programs\go. It is important to copy the entire folder. Now you need to set the path. However, this does not work via the GUI without admin rights, but it does work with Powershell, though. Open Powershell and execute the following commands:
$userpath = [System.Environment]::GetEnvironmentVariable("PATH","USER")
$userpath = $userpath + ";C:\Users\<username>\AppData\Local\Programs\go\bin"
[System.Environment]::SetEnvironmentVariable("PATH",$userpath,"USER")
First, save the existing user path in the variable of the same name. Then add the path to GO at the end. It is important to set the path to the bin folder. The last command then sets the user path in the USER PATH variable.
You can check this with:
echo $env:path
The path should now be visible at the end of the path displayed. For this to work in Powershell, you need to open a new Powershell session. Then you can use
go version
to see if everything is working.
Now you can also use GO in Visual Code, for example. Just install the GO extension and it will work without any errors.