FAQ about GoLand
- General questions
- Is there a GoLand Community edition?
- How to get GoLand for free or at a discount?
- Is GoLand available via the JetBrains Toolbox as part of the All Products Pack?
- What is the difference between GoLand and the Go plugin for IntelliJ IDEA Ultimate?
- Does GoLand include support for databases?
- In addition to Go, which web technologies does GoLand support?
- How to leave feedback or submit a bug?
- Configuring Go development environment
- Working with projects
- How do I open a VSCode project in GoLand?
- What's the difference between workspaces and projects?
- How can I open several projects in GoLand simultaneously?
- How do I change the Go SDK for my project?
- How do I change the GOPATH variable for my project?
- How do I run or debug my application?
- How do I view dependencies for my project in the same window?
- How do I close a project?
- How do I start with VCS integration?
- Working with the code editor
- Can I use the VSCode key bindings in GoLand?
- How do I see the documentation on a mouseover?
- How does code completion in GoLand work?
- How can I use multiple carets/cursors?
- How can I select and rename multiple elements at once?
- What are the automated code refactoring tools available?
- Are there any special code analysis features in GoLand?
- Using plugins
Is there a GoLand Community edition?
No, as there is no way to separate GoLand functionality into free and paid tiers. You can still try GoLand by using a free 30-day trial or Early Access Program (pre-release) versions as long as they are available.
How to get GoLand for free or at a discount?
Free individual licenses are available for students, faculty members, and core contributors to open source projects.
Free individual licenses for students and faculty members: see who can apply for free licenses and how you can do that.
Free Open Source Licenses: see application terms, license terms, and restrictions.
Is GoLand available via the JetBrains Toolbox as part of the All Products Pack?
Yes, it is available both as a standalone IDE and as a part of the All Products Pack.
What is the difference between GoLand and the Go plugin for IntelliJ IDEA Ultimate?
It is the same.
Does GoLand include support for databases?
Yes. The database management functionality in GoLand is supported by the Database tools and SQL plugin. The Database tools and SQL plugin provides support of all the features that are available in DataGrip, the standalone database management environment for developers. With the plugin, you can query, create, and manage databases. Databases can work locally, on a server, or in the cloud. The plugin supports MySQL, PostgreSQL, Microsoft SQL Server, SQLite, MariaDB, Oracle, Apache Cassandra, and others. See the full list of supported vendors in Database connection.
In addition to Go, which web technologies does GoLand support?
How to leave feedback or submit a bug?
The Getting help topic describes how to leave feedback, report a bug, or submit a feature request.
Youtrack issues for GoLand: log in to your JetBrains account and click New issue.
Requests in the JetBrains Support Center: click the Submit a request button that is at the top of the main page.
Twitter: tweet us about your problem. Mention @GoLandIDE in your tweet.
firstname.lastname@example.org: email our team about your problem. Describe your problem, and attach all available materials that can speed up troubleshooting (code samples, screenshots, logs, animations, videos, and other materials).
Configuring Go development environment
What configuration is needed before the start?
To start coding, you need to install Go SDK. In most cases, GOROOT and GOPATH variables are set automatically.
If you have Go SDK installed, GoLand automatically detects and uses it.
If Go SDK is not detected, right from GoLand, you can download Go SDK from the official repository or navigate to the Go SDK directory. You can do that when you create a new project or in settings.
GOROOT is automatically set to the installation directory of Go SDK. The installation directory must include
GOPATH is automatically set to $HOME/go on Unix and macOS and %USERPROFILE%/go on Windows. You can configure the global, project, and module GOPATH variable in settings (press (Ctrl+Alt+S) and navigate to ).
How do I run gofmt/goimports/golang-ci on save?
For a single file, you can use the built-in import management and code formatter. To reformat code, press Ctrl+Alt+L. Imports are managed on-the-fly. To customize import management, open settings by pressing Ctrl+Alt+S and navigate to .
Alternatively, you can use file watchers to trigger gofmt and goimports. File watcher is a built-in GoLand tool that allows you to run command-line tools automatically when files are changed or saved. GoLand automatically saves changes that you make in your files.
How do I see the results of static analysis tools in the editor?
Results of static analysis tools are displayed in the Output tab of the Run tool window.
You can use the built-in or external (like golang-ci) static analysis tool.
How do I change the output directory of the application binary (go build -o)?
Navigate to Output directory field, specify the path that you want to use as the output directory of the application binary., click the run/debug configuration that you use to run your application. In the
Alternatively, open your run/debug configuration and specify
-o directory_path in the Go tool arguments field.
Work with run/debug configurations: read more about run/debug configurations and how to use them.
How do I provide arguments to `go build` and `go test` commands?
Navigate to Go tool arguments field, type a space-separated list of arguments that you want to use with
go build or
If you need to set build constraints, open settings by pressing Ctrl+Alt+S and navigate to . For more information about possible build constraints, see Build Constraints at golang.org.
Working with projects
How do I open a VSCode project in GoLand?
Navigate to Open., select the folder that you want to add, and click
What's the difference between workspaces and projects?
The main difference is that a workspace can contain multiple projects. In Visual Studio Code, you add multiple projects as roots to your workspace (see Multi-root Workspaces in the Visual Studio Code documentation).
GoLand does not use a workspace concept. To have a multi-root structure in GoLand, you need to define projects that you want to add as content roots (see How can I open several projects in GoLand simultaneously?).
If you have only one project in your workspace, these two concepts have no differences.
How can I open several projects in GoLand simultaneously?
Another way is to click Open. In the popup window, select Attach., select the folder of a project that you want to add, and click
How do I change the Go SDK for my project?
You can either download Go SDK from the official repository or navigate to your local copy.
Configuring GOROOT and GOPATH: a help page that shows you how to set GOROOT and GOPATH in GoLand.
How do I change the GOPATH variable for my project?
Open settings by pressing Ctrl+Alt+S and navigate to . Depending on the scope that you want to apply, select the corresponding section (Global GOPATH, Project GOPATH, Module GOPATH) and click the Add button . Navigate to the directory that you want to associate with GOPATH.
You can configure GOPATH for the following scopes: Global, Project, and Module. If you specified all three scopes, GoLand selects the narrowest scope first.
Configuring GOROOT and GOPATH: a help page that shows you how to set GOROOT and GOPATH in GoLand.
How do I run or debug my application?
To run or debug your application, you can use the following approaches:
In the left gutter of the editor, click the Run application icon and select Run <method_name> in <file_name> or Debug <method_name> in <file_name>.
Right-click the opened file or a method in the editor and select Run <method_name> in <file_name> Ctrl+Shift+F10 or Debug <method_name> in <file_name> Shift+F9.
Create a run/debug configuration. For more information about run/debug configurations, see Create a run/debug configuration.
How do I view dependencies for my project in the same window?
You can create a diagram with all the dependencies in the project. Right-click the go.mod file in your project and select .
Create a diagram of dependencies: see the animation that shows how to create a diagram of dependencies.
How do I close a project?
How do I start with VCS integration?
VCS integration enables automatically.
To enable VCS integration manually, click Enable Version Control Integration dialog, select the VCS that you want to use and click OK.. In the
Working with the code editor
Can I use the VSCode key bindings in GoLand?
Install the VS Code Keymap plugin.
To install the VS Code Keymap plugin, use one of the following approaches:
You can download the plugin from plugins.jetbrains.com by using the following link: https://plugins.jetbrains.com/plugin/12062-vs-code-keymap/.
How do I see the documentation on a mouseover?
Hover the cursor over the code element to see documentation on it.
How does code completion in GoLand work?
By default, GoLand displays the code completion popup automatically as you type. Alternatively, you can press Ctrl+Space or select Code | Completion | Basic from the main menu.
Code completion: read about other types of code completion and how you can use them.
How can I use multiple carets/cursors?
To add or remove multiple carets, press and hold Shift+Alt and click at the next location of the caret.
Alternatively, to add multiple carets, you can press Ctrl twice, and then without releasing it, press the Up or Down arrow keys. You can also make a multiple selection by pressing Ctrl and dragging the caret.
Multiple carets: learn about other cases of multiple caret usage.
How can I select and rename multiple elements at once?
In the editor, select an element you want to rename and press Shift+F6. Alternatively, selectfrom the main menu.
Use the Rename refactoring to change names of symbols, files, and all the references to them throughout code.
Rename refactorings: see the topic for more features of the Rename refactoring.
What are the automated code refactoring tools available?
The full list of refactorings for the current context is available under themenu item.
Change signature changes the method or function name; adds, removes, and reorders parameters; assigns default values to new non-variadic parameters.
Extract refactorings extracts code fragments that can be grouped. You can extract a constant, a variable, a method, and an interface.
Inline refactoring moves an extracted code fragment to the calling code. An opposite to the Extract refactoring.
Copy refactoring copies a file, a directory, or a package to a different directory or a package.
Move refactoring moves source code sections to another package or a file. For example, you can use the Move refactoring to move methods to another package.
Code refactoring: see the section to learn more about the mentioned refactorings.
Are there any special code analysis features in GoLand?
GoLand supports gotest, gocheck, and gobench. By using these packages, you can ensure that the behavior of your code is correct and expected.
You can use profiling to get a performance analysis of your tests and benchmarks. During profiling, you see the CPU and memory usage, the frequency and duration of function and method calls. For more information about profiling, see Profiling tests and benchmarks.
How do I find the plugin that I need?
How do I install the plugin that I have available on my computer?
I'd like to write a plugin for GoLand. Are there any instructions?
You can use any edition of GoLand to develop plugins. It provides an open API, a dedicated SDK, module, and run/debug configurations to help you.
The recommended workflow is to use Gradle. For more information, see the IntelliJ Platform SDK Developer Guide.
Can I use Visual Studio Code plugins in GoLand?
No, but you can find a similar plugin in the plugin marketplace. For details, see How do I find the plugin that I need?.