The environment installation method of golang is: 1. Right-click "This Computer" or "Computer Icon" and select the "Properties" option; 2. In the Control Panel window, click "Advanced System" on the right Settings"; 3. Click the "Environment Variables" button to open the "Environment Variables" dialog box; 4. Click "New" under "User Variables" and add a path variable; 5. Edit the "Path" variable to facilitate system search. ;6. Open the command line prompt and enter the "go -v" command to test whether the installation is successful.
Operating system for this tutorial: Windows 10 system, Go1.20.1 version, Dell G3 computer.
The environment installation method of golang is:
1. Right-click "This Computer" or "Computer Icon", and then select "Properties".
#2. In the Control Panel window, click "Advanced System Settings" on the right.
#3. Click the "Environment Variables" button to open the "Environment Variables" dialog box.
4. Click "New" under "User Variables" and add the following variables:
GOROOT: The path to the Go directory to which the installation package is extracted, for example : C:\go or D:\Go
The above is the detailed content of How to install golang environment. For more information, please follow other related articles on the PHP Chinese website!