# Go (GOPATH)

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/2026.3/llms.txt).

You might want to create this type of project if you do not need complex dependency management and are ready to store all project files under `GOPATH`.

Procedure: Create a Go (GOPATH) project

1. Select `File | New | Project…`.

Alternatively, navigate to New | Project on the Welcome to GoLand dialog.

2. In the New Project dialog, select Go (GOPATH).

3. In the Location field, specify the location where you want to store your project.

4. In the GOROOT field, specify the location of your Go installation. GoLand usually detects this location automatically.

To change or install a new Go SDK version, click Add SDK and choose one of the following options:

* Local: to use an existing SDK from your local system.

* Download: to download a Go SDK version from the official repository.

5. (Optional) Use the Index entire GOPATH checkbox to control indexing:

* Clear the checkbox to index only project files and vendored packages. Packages from `GOPATH` will not be indexed, which may improve performance.

* Select the checkbox to index both project files and packages from `GOPATH`.

6. Click Create to create the project.

![Create a project with Go (GOPATH) integration](https://resources.jetbrains.com/help/img/idea/2026.3/go_create_go_project.png)

## Add and install dependencies

`GOPATH` stores your codebase and all the files required for development. It also includes any packages that you download and install. When GOPATH indexing is disabled, only project files and vendored packages are indexed. This may improve performance but prevents you from using packages located in GOPATH.

If your project has external dependencies, consider enabling indexing for the entire GOPATH. By default, this option is disabled.

![Disable Go modules in a project](https://resources.jetbrains.com/help/img/idea/2026.3/go_disable_go_modules_in_a_project.png)

Procedure: Enable entire GOPATH indexing

1. Open settings by pressing `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) and navigate to `Go GOPATH`.

2. Select the Index entire GOPATH checkbox.

Procedure: Download and install dependencies

1. Click an unresolved dependency in the `import` statement and press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Ctrl+.` (VSCode), `⌘ .` (VSCode (macOS)).

2. Select `go get -t <package>` from the list of intention actions.

![Download and install dependencies](https://resources.jetbrains.com/help/img/idea/2026.3/go_download_and_install_dependencies.png)

## Installing Go SDK

> **Note:**
> Ensure that the provided path to the folder with Go SDK includes `bin` and `src` folders.

Procedure: Select a local copy of the Go SDK

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) to open settings and then select `Go | GOROOT`.

2. Click the Add SDK button (![the Add SDK button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg)) and select Local….

3. In the file browser, navigate to the SDK version that is on your hard drive.

4. Click Open.

![Installing Go SDK](https://resources.jetbrains.com/help/img/idea/2026.3/go_installing_go_sdk.png)

Procedure: Download the Go SDK

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) to open settings and then select `Go | GOROOT`.

2. Click the Add SDK button (![the Add SDK button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg)) and 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](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.menu-open_dark.svg)).

5. Click OK.

![Installing Go SDK](https://resources.jetbrains.com/help/img/idea/2026.3/go_downloading_go_sdk.png)

