Quick start guide
This guide helps you get started with GoLand. You will learn how to create and open projects, work with files, run your code, and navigate around the IDE.
note
If you encounter issues while using the IDE, refer to our Support and assistance article. Here, you can find sources to look for answers or ask our team directly.
After you install GoLand and launch it for the first time, you need to create a project. Everything in GoLand is done within the context of a project. A project serves as the foundation for code assistance, refactoring, consistent coding style, and other key features.
You have three options to start working on a project in the IDE:
Open an existing project
Check out a project from a version control system (VCS)
Create a new project
This quick start guide covers only how to create a new project.
Select File | New | Project.
Alternatively, click New Project in the Welcome to GoLand dialog.
In the New Project dialog, select Go modules from the list of available project types.
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.
Click Create to create the project.
To create a Go file, use one of the following options:
In the Project tool window, right-click the parent folder of your project and select New | Go FileGo File.
Click the parent folder of your project, press AltInsert, and select Go File.
Click the parent folder of your project, then go to File | New | Go File.
In the New Go File dialog, enter a file name and choose the file type:
Empty file — creates an empty Go file.
Simple application — creates a Go file with a predefined
main
function.
When you launch GoLand for the first time, the Welcome to GoLand dialog appears. From this dialog, you can create or open a project, check out a project from a version control system, access documentation, and configure the IDE.
After you open a project, the main window appears, divided into several logical areas:

The Project tool window on the left side displays your project files. Tool windows help with project management, navigation, running and debugging code, version control integration, and more. To view all available tool windows, go to View | Tool Windows.
The Editor pane on the right is where you write your code. You can use tabs to switch between open files.
The navigation bar above the editor lets you quickly run and debug your application and perform basic version control actions.
The Gutter is the vertical strip next to the editor. It shows breakpoints and provides navigation to definitions or declarations. You can also click the Run Application icon (
) to run or debug your application.
The Scrollbar on the right side of the editor includes code analysis markers. GoLand continuously inspects your code and highlights issues like errors, warnings, and typos. The indicator at the top of the gutter shows the overall inspection status for the file.
The status bar displays the state of your project and the IDE. It provides details about file encoding, line separators, inspection profiles, and other useful messages.
In the lower-left corner of the IDE, in the Status bar, you can find the or
button. This button toggles the visibility of tool window bars. Hover over it to see a list of currently available tool windows.
As you work in the editor, GoLand analyzes your code, suggests optimizations, and detects potential and actual issues. The features listed below can help you write code more efficiently and improve your overall development experience:
Refactoring is a process of improving your source code without creating a new functionality. Refactoring helps you keep your code solid , dry, and easy to maintain.
GoLand provides the following refactoring options:
Change signature: rename methods or functions, add, remove, or reorder parameters, and assign default values to new non-variadic parameters.
Extract refactorings: extract code fragments into constants, variables, methods, or interfaces to improve clarity and reusability.
Inline refactoring: move the contents of a method or variable directly into the place where it is used. This is the opposite of Extract refactoring.
Copy refactoring: copy a file, directory, or package to another location.
Move refactoring: move functions, types, or other code elements to different packages or files to improve project structure.
GoLand provides two types of code completion:
Basic code completion CtrlSpace helps complete names of types, interfaces, methods, and keywords within the current scope. Suggestions appear automatically as you type.
Smart code completion CtrlShiftSpace filters the list to show only values suitable for the current context.
The following animation demonstrates the difference between basic and smart type-matching completions. Notice the number of suggestions offered for each type:
GoLand provides multiple ways to generate common code constructs and recurring elements, which helps you increase productivity. These can be either file templates used when creating a new file, custom or predefined live templates that are applied differently based on the context, various wrappers, or automatic pairing of characters.
You can generate getters, setters, constructors, missing methods, and test files.
For more information, refer to Using the Generate action.
Use live templates to insert common constructs into your code, such as loops, conditions, declarations, or print statements.
To see the list of live templates, press CtrlAlt0S and go to Editor | Live Templates.
The following animation shows how to create a
Hello World
program using a live template:
In GoLand, there is a set of code inspections that detect and correct abnormal code in your project before you compile it. The IDE can find and highlight various problems, locate dead code, find probable bugs, spelling problems, and improve the overall code structure.
Inspections can scan your code in all project files or only in specific scopes (for example, only in production code or in modified files).
Every inspection has a severity level — the extent to which a problem can affect your code. Severities are highlighted differently in the editor so that you can quickly distinguish between critical problems and less important things. GoLand comes with a set of predefined severity levels and enables you to create your own.
To view and configure inspections, press CtrlAlt0S and navigate to Editor | Inspections. You can enable or disable inspections and change their severity levels.
For example, the Unreachable code inspection detects unreachable code.
As you work in the editor, GoLand analyzes your code and searches for ways to optimize it. Intention actions cover a wide range of situations from errors and warnings to optimization suggestions.
In GoLand, you can use the following types of intention actions:
Intention actions
: an action that generates a piece of code or suggests an alternative variant for your code. Usually, an intention action is applied to a valid piece of code. By clicking the yellow bulb icon, you can view intention actions available in the current context. For example, you can create a constructor that generates values of a struct type. Or, replace the if-else statement with the equivalent one but with a negated condition and swapped if-else branches.
Quick-fixes
: an action that suggests a solution for a problem in your code. Usually, the intention action is applied to a code that has an error. For example, when you missed brackets at the end of the expression. Or, when you forgot to convert a value to a specific type.
To see the list of available intention actions, press CtrlAlt0S and navigate to Editor | Intentions.
Click the light bulb icon or press AltEnter to open the list of suggestions.
Select an action from the list and press Enter.
For example, you can use an intention action to inject another language into your code:
You can run and debug your code in GoLand using the keyboard, the context menu, the gutter menu, or by creating a Run/Debug configuration.
To run your application, press ShiftF10, or click the Run Application icon
in the gutter and select Run <application_name>.
Debugging begins with placing breakpoints, which suspend program execution so you can inspect program data. To set a breakpoint, click the line number in the gutter where you want execution to pause.
To debug your application, press ShiftF9, or click the Run Application icon
in the gutter and select Debug <application_name>. Then, step through the execution using the options in the Run menu or the Debug tool window.
For more information, refer to Debugging.
Thanks for your feedback!