Go modules (vgo) integration
Create a project with integration of go modules
GoLand provides integration with go modules (formerly, vgo) out of the box.
Click
.In the New Project window, select Go Module (vgo).
Ensure that the project uses correct file paths and click OK.
Fetch dependencies with go modules
You can fetch a dependency with go modules if a project misses it.
Click the dependency declaration.
Press Alt+Enter and select Sync packages of <project_name>.
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.
Open Settings (Ctrl+Alt+S) and navigate to
.Select the Enable Go Modules (vgo) integration checkbox and ensure that the Vgo Executable field points to a valid Project SDK directory.
Click OK.
Create a diagram of dependencies
Enable Go modules in your project.
Right-click the
go.mod
file in your project and select .