GoLand 2018.1 Help

Installing and Launching GoLand

Installation requirements

Hardware requirements

  • 2 GB RAM minimum, 4 GB RAM recommended
  • 1.5 GB hard disk space + at least 1 GB for caches
  • 1024x768 minimum screen resolution

Software requirements

JRE 1.8 is bundled with the GoLand distribution. You do not need to install Java on your computer to run GoLand.

32-bit or 64-bit versions of Microsoft Windows 10, 8, 7 (SP1), or Vista (SP2) macOS 10.8.3 or later
(only 64-bit systems are supported)
  • OS Linux (note that a 32-bit JDK is not bundled, so a 64-bit system is recommended)
  • KDE, Gnome or Unity desktop environment recommended

Download and install GoLand

To install GoLand

  1. Download GoLand for your operating system.
  2. Do the following depending on your operating system:
    • Windows installation:
      1. Run the *.exe file you've downloaded.
      2. Follow the instructions in the installation wizard.
    • macOS installation:
      1. Open the .dmg package that you've downloaded, and drag GoLand to the Applications folder.
    • Linux installation:
        1. Unpack the goland-2017.3.tar.gz file you have downloaded to a different folder if your current Downloads folder doesn't support file execution:
          tar xfz goland-2017.3.tar.gz <new_archive_folder>

          The recommended installation location according to the filesystem hierarchy standard (FHS) is /opt. To install GoLand into this directory, enter the following command:

          sudo tar xfz goland-2017.3.tar.gz -C /opt/
        2. Switch to the bin subdirectory:
          cd <new archive folder>/goland-2017.3/bin
          For example,
          cd /opt/goland-2017.3/bin
        3. Run goland.sh from the bin subdirectory.

    Manage GoLand through Toolbox App

    Toolbox App is a control panel that allows you to manage all JetBrains developer tools, including GoLand, as well as your projects, from a single point of access. It lets you maintain different versions of the same tool, install updates and roll them back if needed. It also remembers your JetBrains Account and uses it to automatically log you in when you install and register new tools.

    1. Download Toolbox App.
    2. Launch the setup file.
    3. When the installation is complete, accept the JetBrains privacy policy and sign in to your JetBrains Account.

    Now you can manage existing tools, install new tools and download updates:

    go toolbox

    Update GoLand

    1. Download the latest version of GoLand.
    2. Launch the setup as described in Download and install GoLand.
    3. Choose whether you want to uninstall the existing GoLand version together with its settings, caches and local history and follow the instructions of the installation wizard.

    Run GoLand for the first time

    Import GoLand settings

    When you start GoLand for the first time, or after you have upgraded it from a previous version, the Complete Installation dialog opens where you can select whether you want to import the IDE settings.

    If this is your first instance of GoLand, choose the Do not import settings option.

    Create a workspace and start a project in GoLand

    After you have completed the initial GoLand configuration, the Welcome screen appears.

    go welcome screen

    Set up a workspace

    Before you start creating or importing your GoLand project, make sure you have done the following:

    • Created a workspace where you keep projects.
      Use the following layout:
      • work
        • bin
        • pkg
        • src
          • github.com
            • user_name
              • project1
              • project2
    • Downloaded Go distribution.
    • Defined the environment variable GOPATH that points to the workspace location. This variable will be used by Go commands and the IDE to resolve import statements, install, build and update packages, etc.

    Create a new project

    1. Click Create New Project on the Welcome screen.
    2. If the workspace is set up then GoLand will suggest you to create a project in the src subdirectory. Specify the name of your project in the Location field, the Go SDK (GOROOT) and click Create.
      go new project

    GoLand creates a project in the workspace and the appropriate Go settings.

    Open an existing project

    1. On the Welcome screen click Open and select the project directory. If your project is not inside the created workspace, move the project into your workspace first.
    2. When you open your project GoLand automatically tries to locate SDK (GOROOT). If GoLand cannot find GOROOT, the appropriate message with a link will appear suggesting to configure the Go SDK.
      Click the suggested link and specify the location of the Go distribution. After you set SDK, wait until GoLand finishes indexing the workspace.

    Run applications

    You can quickly create and run a Go application.

    1. In the Project tool window, right-click the project.
    2. From the context menu, select New | Go File.
    3. In the dialog that opens, specify the name of your application and select Simple Application from the Kind drop-down list.
      GoLand creates an executable application.
    4. In the editor add code and click the run icon in the left gutter or press Ctrl+Shift+F10 to run the application. The result is displayed in the Run tool window.

    If you need to adjust your run configuration or create a new one for running or testing, use Run/Debug Configurations.

    1. On the main menu, select Run | Edit Configurations.
    2. In the Run/Debug Configurations dialog, click add and from the list that opens, select the appropriate configuration.
      • The Go Build type is equal to go build command.
      • The Go Test type is equal to go test. Make sure to select the test framework your tests use: gotest, gocheck or gobench.
      • The Go App Engine type lets you run Go App Engine applications. Note, it requires your Go module to use a Go AppEngine SDK.
    3. Specify the run configuration options. You can also specify Before Launch options, for example, you can add a Go command that you want to run before executing the created configuration. Click OK.
    4. On the main menu, select Run | Run or press Ctrl+Shift+F10.

    Change the GOPATH or the GOROOT settings

    1. Press Ctrl+Alt+S to open the Settings/Preferences dialog.
    2. From the options on the left, click GO and depending on the settings you want to change, select either GOPATH or GOROOT.
    3. On the GOROOT settings page, you can change the GOROOT location or specify a new version of the downloaded Go SDK.
      On the GOPATH settings page, you can change GOPATH global and project-level settings. If you'd like to use a GOPATH different from the one specified in the environment variable, clear the option Use GOPATH that's defined in system environment and specify the one you want.

    Register GoLand

    To try and evaluate GoLand, you can download and install its trial version for free. The trial version is available for 30 days, whereupon you need to obtain and register a license.

    1. Do one of the following:
      • On the Welcome screen, click Configure | Manage License
      • Select Help | Register from the main menu
    2. Select how you want to register GoLand:
      • JetBrains Account: select this option if you have a JetBrains Account that allows you to access your purchases and manage licenses (see What is JetBrains Account? to learn more).
      • Activation code: select this option if you have an activation code for GoLand, and paste it to the text area.
      • License server: select this option to register GoLand through the License Server web application that allows you to manage floating licenses and issue licenses to users who do not have direct internet access.

        To override the URL of the system proxy during initial GoLand startup, use the -Djba.http.proxy property, which can be added as a JVM option.

        When performing silent install or managing GoLand installations on multiple machines, you can set the JETBRAINS_LICENSE_SERVER environment variable to point the installation to the license server URL.

    Location of GoLand settings, plugins, and logs directories

    After you have installed GoLand, its default location depends on your operating system.

    Operating systemLocation
    Windows Vista, 7, 8, 10c:\Users\UserName\.Goland<version>\
    Windows XPc:\Documents and Settings\UserName\.Goland<version>\
    Linux and other Unix systemsGoLand directory starting with dot is located in your user home directory:
    Mac OS XEach created subdirectory has its own location:
    Configuration (idea.config.path): ~/Library/Preferences/Goland<version>
    Caches (idea.system.path): ~/Library/Caches/Goland<version>
    Plugins (idea.plugins.path): ~/Library/Application Support/Goland<version>
    Logs (idea.log.path): ~/Library/Logs/Goland<version>

    If you want to override the default settings, refer to the support article.

    Install GoLand as a snap package on Linux

    You can install GoLand on Linux as a self-contained snap package. Since snaps update automatically, your GoLand installation will always be up-to-date.

    GoLand is distributed via two channels:

    • The stable channel includes only stable versions. To install the latest stable release of GoLand, run the following command:

      $ sudo snap install goland --classic
    • The edge channel includes EAP builds. To install the latest EAP build of GoLand, run the following command:

      $ sudo snap install goland --classic --edge

    When the snap is installed, you can launch it by running the goland command.

    To list all installed snaps, run sudo snap list. For more information, see the Snapcraft documentation.

    Last modified: 25 July 2018

    See Also