Go (GOPATH)
You might want to create this type of a project if you do not need complex dependency management and ready to store all the project files under GOPATH.
Click File | New | Project. Alternatively, on the Welcome screen, click New Project.
In the New Project dialog, select Go (GOPATH).
In the Location field, specify where you want to store your project.
In the GOROOT field, specify the location of your Go installation. GoLand typically detects this location automatically.
To change or install a new version of the Go SDK, click Add SDK (
) and select one of the following options:
Local: to select a Go SDK version on your local drive.
Download: to download the Go SDK from the official repository.
(Optional) Toggle the Index entire GOPATH checkbox:
When cleared, project files and vendored packages are indexed. Packages from GOPATH are not indexed. Might improve the overall performance.
When selected, packages from GOPATH and project files are indexed.
Click Create.
GOPATH stores your code base and all the files that are necessary for your development. Also, it includes packages that you download and install. When disabled, only project and vendored packages are indexed. It might improve the overall performance but makes it impossible to use packages from GOPATH.
If your project has external dependencies, you might want to enable entire GOPATH indexing. By default, indexing of entire GOPATH is disabled.

Open settings by pressing CtrlAlt0S and navigate to Go | GOPATH. .
Select the Index entire GOPATH checkbox.
Click an unresolved dependency in the
import
section and press AltEnter.Select
go get -t <package>
.
note
Ensure that the provided path to the folder with Go SDK includes bin and src folders.
Press CtrlAlt0S to open settings and then select Go | GOROOT.
Click the Add SDK button (
) and select Local.
In the file browser, navigate to the SDK version that is on your hard drive.
Click Open.
Press CtrlAlt0S to open settings and then select Go | GOROOT.
Click the AddSDK({0}) button (
) and select Download.
From the Version list, select the SDK version.
In the Location field, specify the path for the SDK. To use a file browser, click the Browse icon (
).
Click OK.
Thanks for your feedback!