GoLand 2024.1 Help

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

  1. Download the installer .exe from the Toolbox App web page.

  2. Run the installer and follow the wizard steps.

  3. After you run the Toolbox App, click its icon Toolbox App 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).

GoLand in the Toolbox App

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

  1. Download the disk image .dmg from the Toolbox App web page.

  2. Mount the image and drag the JetBrains Toolbox app to the Applications folder.

  3. 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).

GoLand in the Toolbox app

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

  1. Download the tarball .tar.gz from the Toolbox App web page.

  2. Extract the tarball to a directory that supports file execution.

    For example, if the downloaded version is 1.17.7391, you can extract it to the recommended /opt directory using the following command:

    sudo tar -xzf jetbrains-toolbox-1.17.7391.tar.gz -C /opt
  3. Execute the jetbrains-toolbox binary from the extracted directory to run the Toolbox App.

    After you run the Toolbox App for the first time, it will automatically add the Toolbox App icon Toolbox App icon to the main menu.

  4. 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.1 Nightly).

GoLand in the Toolbox App

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

  1. In the Welcome to GoLand dialog, click Open.

    Alternatively, click File | Open.

  2. In the file browser, navigate to a folder with project files and click Open.

  3. Click OK.

    Welcome screen

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 Go | GOROOT. Click the Add SDK button and select between two options:

  • Add 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 the Browse icon. Click OK.

Clone an existing project from a Version Control System

  1. In the Welcome to GoLand dialog, click Get from Version Control.

  2. 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.

      Authorize in GitHub
    • 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.

  3. 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 Go | GOROOT. Click the Add SDK button and select between two options:

    • Add 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 the Browse icon. Click OK.

    For more information about version control systems, refer to Version control.

    Clone a repository

Create a Go project

  1. Select File | New | Project.

    Alternatively, click New Project in the Welcome to GoLand dialog.

  2. In the New Project dialog, select Go from the list of available projects.

  3. In the GOROOT field, specify the location of your Go installation. Usually, the location is defined automatically.

    To change or install a new version of Go SDK, click the Add SDK button and select Local to choose the Go SDK version on your hard drive, or select Download to download Go SDK from the official repository.

  4. (Optional) Select or clear the Enable vendoring support automatically checkbox.

  5. (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.

  6. Click Create.

    Integration with Go

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

Ensure that the provided path to the folder with Go SDK includes bin and src folders.

  1. Open settings (Ctrl+Alt+S) and navigate to Go | GOROOT.

  2. Click the Add SDK button the Add SDK button and select Local.

  3. In the file browser, navigate to the SDK version that is on your hard drive.

  4. Click Open.

    Select a local copy of Go SDK

Download the Go SDK

  1. Open settings (Ctrl+Alt+S) and navigate to Go | GOROOT.

  2. Click the Add SDK button (the Add SDK icon) and select Download.

  3. From the Version list, select the SDK version.

  4. In the Location field, specify the path for the SDK. To use a file browser, click the Browse icon the Browse icon.

  5. 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.

    Download 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

  1. To view the keymap configuration, open the Settings dialog Ctrl+Alt+S and select Keymap.

  2. From the drop-down menu, select VSCode.

    Changing a keymap

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 plugin from Marketplace

  1. Press Ctrl+Alt+S to open the IDE settings and then select Plugins.

  2. Click the Marketplace tab and type the plugin name in the search field.

  3. 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.

Last modified: 02 May 2024