Here are the steps to install and configure the Go language environment and GoLand IDE on Windows:
- Download and install the Go language environment.
- Set the Go language environment variables.
- Download and install GoLand.
- Configure the Go SDK in GoLand.
- Create a new Go project.
After completing these steps, you can start using the Go language for development in GoLand.
Here are the specific steps to install and configure the Go language environment and GoLand IDE on Windows:
-
Download and install the Go language environment.
Download the appropriate Go language installer for your Windows version from the official website (https://golang.org/dl/), and follow the prompts to install it. I downloaded the MSI installer and specified the installation directory as the previously installed GO folder before reinstalling the system; make sure to delete the previous Go folder, otherwise the installer may encounter bugs. -
Set the Go language environment variables.
On Windows, you need to add the installation path to the system's Path environment variable in order to use the Go command in the terminal or command prompt. To add the installation path to the Path environment variable, right-click on "This PC" or "Computer," select "Properties," then choose "Advanced system settings." Under the "Advanced" tab, click on "Environment Variables," find the Path variable, and add the installation path of Go language to its value, such asC:\Go\bin
. Since I used the MSI installer, the environment variables have already been automatically added. -
Download and install GoLand.
You can download the GoLand installer from the JetBrains website (https://www.jetbrains.com/go/download/), and follow the prompts to install it. -
Configure the Go SDK in GoLand.
Launch GoLand, click on "File" -> "Settings" to open the settings window, then select the "Go" option in the left menu. In the right panel, click on the "+" button and select "Add New...," choose "Local," browse to the installation path of Go language, and click "OK" to complete the configuration of Go SDK. -
Create a new Go project.
Click on the "Create New Project" button in the "Welcome" window of GoLand, select "Go," specify your project name and location, and click "Create." GoLand will create a new Go project for you.
Additionally, if you need more detailed steps and instructions, please refer to the following links:
- Installing the Go language environment: https://golang.org/doc/install
- Installing GoLand: https://www.jetbrains.com/help/go/installation-guide.html
- Configuring Go SDK in GoLand: https://www.jetbrains.com/help/go/configure-go-sdk.html
- Creating a new Go project: https://www.jetbrains.com/help/go/creating-and-running-your-first-go-application.html