Installing and configuring GoLand
There are many ways to install GoLand. In this guide, we will use the JetBrains Toolbox App approach as it allows managing your IDE installations easier. For more information about other possible installation options, refer to the installation guide.
Install using the Toolbox App
The JetBrains Toolbox App is the recommended tool to install JetBrains products. Use it to install and manage different products or several versions of the same product, including Early Access Program (EAP) and Nightly releases, update and roll back when necessary, and easily remove any tool. The Toolbox App maintains a list of all your projects to quickly open any project in the right IDE and version.
For more information about Nightly builds, refer to What are nightly builds? in the FAQ section.
Install the Toolbox App
Download the installer .exe from the Toolbox App web page.
Run the installer and follow the wizard steps.
After you run the Toolbox App, click its icon in the notification area and select which product you want to install.
To install a specific version, click and select Available versions.
To install a nightly build, select the version that has Nightly
in its name from the list of versions (for example, 2021.1 Nightly).
Log in to your JetBrains Account from the Toolbox App, and it will automatically activate the available licenses for any IDE that you install.
Install the Toolbox App
Download the disk image .dmg from the Toolbox App web page.
Mount the image and drag the JetBrains Toolbox app to the Applications folder.
After you run the Toolbox App, click its icon in the main menu and select which product you want to install.
To install a specific version, click and select Available versions.
To install a nightly build, select the version that has Nightly
in its name from the list of versions (for example, 2021.1 Nightly).
Log in to your JetBrains Account from the Toolbox App, and it will automatically activate the available licenses for any IDE that you install.
Install the Toolbox App
Download the tarball .tar.gz from the Toolbox App web page.
Extract the tarball and launch the executable:
tar -xzf jetbrains-toolbox-<build>.tar.gz && cd jetbrains-toolbox-<build> && ./jetbrains-toolboxThe Toolbox App will install itself into
$HOME/.local/share/JetBrains/Toolbox/bin
and run from there.After you run the Toolbox App for the first time, it will automatically add the Toolbox App icon to the main menu.
Select the product that you want to install.
To install a specific version, click and select Available versions.
To install a nightly build, select the version that has Nightly
in its name from the list of versions (for example, 2024.3 Nightly).
Log in to your JetBrains Account from the Toolbox App, and it will automatically activate the available licenses for any IDE that you install.
Setting up your work environment
After installation, you are ready to open or create a project, configure the Go SDK, and customize the IDE. Customization includes setting up a preferred keymap (for example, the VS Code keymap), and installing plugins/extensions from the JetBrains Marketplace to enhance functionality.
Opening projects
After you have installed GoLand and launched it for the first time, you need to create a project. Everything you do in GoLand is done within the context of a project. It serves as a basis for coding assistance, bulk refactoring, coding style consistency, and other features.
You have three options to start working on a project inside the IDE:
Open an existing project
In the Welcome to GoLand dialog, click Open.
Alternatively, click
.In the file browser, navigate to a folder with project files and click Open.
Click OK.
After you have opened your project, you need to specify the location of the Go SDK. You can specify a local path to the SDK or download it. To set the Go SDK, open settings Ctrl+Alt+S and navigate to Add SDK button and select between two options:
. Click theAdd SDK: use a local SDK copy. In the file browser, navigate to the SDK version that is on your hard drive.
Download: download the SDK. In the Location field, specify the path for the SDK. To use a file browser, click the Browse icon . Click OK.
Clone an existing project from a Version Control System
In the Welcome to GoLand dialog, click Get from Version Control.
From the Version Control list, select Git or Mercurial:
To check out files from GitHub, select GitHub and click Log In via GitHub. You will be redirected to account.jetbrains.com where you need to click Authorize in GitHub. Enter your GitHub credentials and grant access to your GitHub account.
To check out files from Mercurial, install and configure Mercurial and restart GoLand. Enter a path to the sources and clone the repository to your computer.
After you have opened your project, you need to specify the location of the Go SDK. You can specify a local path to the SDK or download it. To set the Go SDK, open settings Ctrl+Alt+S and navigate to Add SDK button and select between two options:
. Click theAdd SDK: use a local SDK copy. In the file browser, navigate to the SDK version that is on your hard drive.
Download: download the SDK. In the Location field, specify the path for the SDK. To use a file browser, click the Browse icon . Click OK.
For more information about version control systems, refer to Version control.
Create a Go project
Select
.Alternatively, click New Project in the Welcome to GoLand dialog.
In the New Project dialog, select Go from the list of available projects.
In the GOROOT field, specify the location of your Go installation. GoLand typically detects this location automatically.
To change or install a new version of the Go SDK, click Add SDK () and select one of the following options:
Local: to select a Go SDK version on your local drive.
Download: to download the Go SDK from the official repository.
(Optional) Select or clear the Enable vendoring support automatically checkbox.
(Optional) In the Environment field, specify environment variables that you need for your project. For example, the
GOPROXY
environment variable. Read more about environment variables in the Environment variables section.Click Create.
Configuring Go
To start your project in GoLand, you need to configure Go SDK. You can use SDK that is already installed on your computer or download it from GoLand.
Configure GOROOT
To see the current value of GOROOT, open settings (Ctrl+Alt+S) and navigate to
. Click the drop-down list and select the Go version.If no Go version is available, click the Add SDK button to download a Go version or select a path to a local copy of Go SDK.
Select a local copy of the Go SDK
Ensure that the provided path to the folder with Go SDK includes bin and src folders.
Open settings (Ctrl+Alt+S) and navigate to
.Click the Add SDK button and select Local.
In the file browser, navigate to the SDK version that is on your hard drive.
Click Open.
Download the Go SDK
Open settings (Ctrl+Alt+S) and navigate to
.Click the Add SDK button () and select Download.
From the Version list, select the SDK version.
In the Location field, specify the path for the SDK. To use a file browser, click the Browse icon .
Click OK to close the Download Go SDK dialog.
As you click Apply or OK on the GOROOT page, GoLand will start downloading and unpacking the Go SDK.
Configuring keymap
You can use a default keymap for your IDE or use a keymap for VS Code. If you need a printable version of default shortcuts in PDF, click the following link.
Setting a Visual Studio Code keymap
To view the keymap configuration, open the Settings dialog Ctrl+Alt+S and select Keymap.
From the drop-down menu, select VSCode.
Installing extensions
In GoLand, extensions are called plugins. They function similarly to extensions in VS Code, enabling you to enhance the built-in features and customize your IDE.
Install a plugin from Marketplace
Press Ctrl+Alt+S to open settings and then select
.Click the Marketplace tab and type the plugin name in the search field.
To install the plugin, click Install and restart GoLand.
To install a specific version, go to the plugin page in JetBrains Marketplace, download and install it as described in Install plugin from disk. For example, you can do it if the most recent version of the plugin is broken.
For more information about plugins, refer to Plugins.