GoLand 2018.3 Help

Go modules (vgo) integration

Create a project with integration of go modules

GoLand provides integration with go modules (formerly, vgo) out of the box.

  1. Click File | New | Project.

  2. In the New Project window, select Go Module (vgo).

  3. Ensure that the project uses correct file paths and click OK.

Integration with go modules

Fetch dependencies with go modules

You can fetch a dependency with go modules if a project misses it.

  1. Click the dependency declaration.

  2. Press Alt+Enter and select Sync packages of <project_name>.

Fetch a source with go modules

Enable Go modules in a project

A new Go modules project already has Go modules enabled. If you pulled your Go modules project from Github, you need to enable Go modules manually.

  1. Open Settings (Ctrl+Alt+S) and navigate to Go | Go modules.

  2. Select the Enable Go Modules (vgo) integration checkbox and ensure that the Vgo Executable field points to a valid Project SDK directory.

  3. Click OK.

Enable Go modules in a project

Create a diagram of dependencies

  1. Enable Go modules in your project.

  2. Right-click the go.mod file in your project and select Diagrams | Show Diagram.

Last modified: 6 February 2019