GoLand 2024.3 Help

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 (File | New | 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

  1. Click File | New | Project. Alternatively, on the Welcome screen, click New Project.

  2. On the New Project page, select the type of project you want to create. You can refer to the available options in the Project types table.

  3. 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 (Add SDK icon) 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.

  4. (Optional) To prevent GoLand from creating a main.go file with sample code, clear the Add sample code checkbox. When selected, GoLand creates this file to demonstrate basic IDE functionality.

  5. Click Create.

General procedure of creating a project

Project types

Project type

Description

Go

A project with Go modules dependency management.

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, refer to App Engine at cloud.google.com.

HTML5 Boilerplate

A project with integration with the HTML5 Boilerplate framework. For more information about HTML5 Boilerplate, refer to documentation at html5boilerplate.com.

React

A project with React integration. For more information about React, refer to documentation at reactjs.org.

Bootstrap

A project with Bootstrap integration. For more information about Bootstrap, refer to 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, refer to 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. For more information, refer to WebAssembly documentation at webassembly.org.

Installing Go SDK

Select a local copy of the Go SDK

  1. Press Ctrl+Alt+S to open settings and then select Go | GOROOT.

  2. Click the Add SDK button (the Add SDK button) 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

Download the Go SDK

  1. Press Ctrl+Alt+S to open settings and then select Go | GOROOT.

  2. Click the AddSDK({0}) button (the Add SDK button) 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).

  5. Click OK.

    Installing Go SDK
Last modified: 12 November 2024