GoLand 2021.3 Help

Dep

Dep was an official experiment to implement a package manager for Go. As of 2020, Dep is deprecated and archived in favor of Go modules, which have had official support since Go 1.11. For more information about Dep, see official documentation at golang.github.io.

Create a project with Dep integration

  1. Install the dep distribution.

  2. Select File | New | Project.

  3. In the New Project page, select Dep.

  4. In the Location field, specify the path where you want to store your project.

  5. 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. For more information about installing Go SDK, see Installing Go SDK.

  6. From the Dep Executable list, select a path to the dep executable. To select a path to the dep executable manually, click the Browse button ( the Browse button) and navigate to the folder with the dep executable.

  7. Click Create.

    Create a project with Dep integration

Import dependencies

  1. Click the dependency declaration.

  2. Press Alt+Enter and select dep ensure.

    Import dependencies

Specify the Dep executable for an existing Dep project

  1. Press Ctrl+Alt+S to open the IDE settings and select Go | Dep.

  2. Ensure that the Enable dep integration checkbox is selected.

  3. From the Dep executable list, select the existing Dep executable. Alternatively, click the browse button the browse button and specify a path to the Dep executable on your hard drive.

    Specify the Dep executable for an existing Dep project

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

  1. In the New Project dialog, select Dep.

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

Download the Go SDK

  1. In the New Project dialog, select Dep.

  2. Click the Add SDK… button 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.

Last modified: 19 March 2022