Create a new project
By default, GoLand suggests creating a Go modules project. With Go modules, you do not need to keep your project files under GOPATH and can easily manage dependencies in your project. Read more about Go modules at go.dev.
If you plan to work on a project that does not require complex dependency management, consider creating the Go (GOPATH) project ( ). Note that without Go modules, you need to store your source code under the GOPATH directory (a Go workspace). Also, you cannot install multiple versions of the same dependency package since the go get
command downloads the dependency package to the same directory.
General procedure of creating a project
Click Welcome screen, click New Project.
. Alternatively, on theOn the New Project page, select what project type you want to create. You can see a list of project types in the Project types table.
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.
Click Create.
Project types
Project type | Description |
---|---|
Go | A project with Go modules dependency management. |
Dep | A project with |
App Engine | A project with Google App Engine integration. With App Engine integration, you can run and debug Google App Engine applications. For more information about App Engine, see App Engine at cloud.google.com. |
HTML5 Boilerplate | A project with integration with the HTML5 Boilerplate framework. For more information about HTML5 Boilerplate, see documentation at html5boilerplate.com. |
React | A project with React integration. For more information about React, see documentation at reactjs.org. |
Bootstrap | A project with Bootstrap integration. Read more about Bootstrap at https://getbootstrap.com. |
React Native | A project with React integration. React Native is an open-source mobile application framework. For more information about React Native, see documentation at reactnative.dev. |
WebAssembly (Wasm) | A project with WebAssembly integration. WebAssembly (Wasm) is a binary code that you can run in a browser. GoLand supports generation of WASM files from GO files. You can read more about WebAssembly in WebAssembly documentation at webassembly.org. |
Installing Go SDK
Select a local copy of the Go SDK
Press Ctrl+Alt+S to open the IDE settings and select
.Click the AddSDK({0}) button () and select Local….
In the file browser, navigate to the SDK version that is on your hard drive.
Click Open.
Download the Go SDK
Press Ctrl+Alt+S to open the IDE settings and select
.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.