GoLand 2020.1 Help

Run GoLand for the first time

When you run GoLand for the first time, some steps are required to complete the installation, customize your instance, and start working with the IDE.

How to run

You can use the Toolbox App to run any JetBrains product. In case of a standalone installation, running GoLand depends on the operating system:

  • Find GoLand in the Start menu or use the desktop shortcut, if it was created during installation. You can also run goland.bat in the installation directory under bin.

  • Run the GoLand app in the Applications directory, from Launchpad, or from Spotlight.

  • Run the goland.sh shell script in the installation directory under bin. You can also use the desktop shortcut, if it was created during installation.

Start a project in GoLand

On the Welcome screen, you can do the following:

Open an existing project

  • To open a project that you store on your computer, click Open Project. In the file browser, navigate to a folder with project files and click Open.

    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:

    • Local: 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.

    Welcome screen

Clone an existing project from a Version Control System

  1. Also, you can download sources from a VCS storage or repository. Click Get from Version Control and select between Git (GitHub) or Mercurial:

    • To check out files from GitHub, click GitHub, enter your credentials and click Log in. Enter a path to the sources and clone the repository to your computer.

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

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

    • Local: 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, see Version control.

    Clone a repository

Create a new project

  1. To create a project, perform one of the following actions:

    • Select File | New | Project.

    • On the Welcome screen, click New Project.

  2. In the New Project dialog, select Go.

  3. In the GOROOT field, specify the Go SDK. You can select a local copy of SDK or download it.

    • To select a local copy of the Go SDK, click the Add SDK icon (the Add SDK icon) near the GOROOT field and select Local. In the file browser, navigate to the SDK version that is on your hard drive.

    • To download the Go SDK, click the Add SDK icon (the Add SDK icon) near the GOROOT field and select Download. From the Version list, select the SDK version. In the Target directory field, specify the path for the SDK. To use a file browser, click the Browse icon the Browse icon. Click OK.

  4. Click Create.

    Download Go SDK

Create a Go file

  1. A new project has no Go files. To create a Go file, perform one of the following actions:

    • Right-click the parent folder of a project, and select New | Go File.

    • Click the parent folder of a project, pressAlt+Insert, and select Go File.

    • Click the parent folder of a project, navigate to File | New | Go File.

  2. In the New Go File dialog, type a name of the file and select whether you want to create an empty Go file (Empty file) or a Go file with the defined main function (Simple Application).

    Create a Go file
Last modified: 09 July 2020