Since releasing GoLand 2019.2 this summer, we’ve been working hard to make GoLand perform faster and consume less CPU. One of the major performance improvements is reducing the startup times, when the IDE prepares everything under the hood, displays the welcome screen, and indexes a project.
Please note that results may vary depending on the size of your project and your device’s age, RAM, and disk space. We will keep working on this, so you can expect even faster startup times in future releases.
GoLand 2019.3 provides syntax highlighting and navigation for
go.mod files. Press ⌘+B on macOS or Ctrl+B
on Windows/Linux on a specific dependency import path, and GoLand will navigate you to
its sources in the Project View.
Also, in the Project View, the Go Modules will be displayed with their full import path instead of just the last segment of it. The version of each Go Module will also be shown in a more muted font color than the import path, to help you easily distinguish between them.
Evaluate Expression in the debugger now lets you call a method of an embedded field directly.
Many production services written in Go run on Linux and Mozilla rr can help investigate bugs that are difficult to reproduce. Mozilla rr debugging is supported starting from GoLand 2018.3, but it used to work only on developer machines running Linux. Now, it is possible to start a debug server on a Linux machine and to debug the trace remotely from macOS and Windows. Follow these steps:
dlv --headless --api-version 2 -l localhost:2345 replay /path/to/trace/dir /path/to/binary.
Please note Mozilla rr is available only on Linux machines.
For an unused parameter, GoLand now highlights its name and type if both can be removed, or only the name if the type is used for implementing a method specification.
In the latter case, the IDE provides two quick-fixes for you to choose from: Delete parameter names or Rename to_. The same behavior is provided for functions that are used as a function type
Also, now it’s possible to remove all the unused parameters in one go. Press Alt+Enter and use the Delete all unused parameters quick-fix.
GoLand provides a quick-fix to create a missing function or method when it's used in a function type. Just press Alt+Enter and choose Create method/function.
GoLand now suggests importing packages based on their used aliases via Alt+Enter in any file in your project.
Change Signature now always shows the type of parameters in the Parameters and Result parameters tabs. Tick the new Reuse types checkbox to collapse consequence types in the Signature Preview and the result.
In addition, you will find two new intention actions, Reuse signature types which merges parameter definitions in a single declaration, and Expand signature types which adds types to each parameter via Alt+Enter.
Extract Variable and Rename are now better at suggesting names. For
err is suggested for expressions of type error,
context.Context, and so on.
GoLand’s code inspections are more focused now. We've reduced the highlighting range of the detected issues in the code editor, to help show the most relevant quick-fixes and intention actions for a particular piece of code when you invoke the context menu via Alt+Enter.
We’ve improved the rune literal lexer in several ways:
Go allows using existing variables on the left-hand side of short var declarations. Thus, two constructs that look the same can have different meanings. To make this easier to spot, we’ve added syntax highlighting for such reassignments.
GoLand 2019.3 provides code folding for composite literals. Use the code folding toggles to fold or expand the code fragment, or press Ctrl+NumPad Minus/Ctrl+NumPad Plus on Windows or ⌘+NumPad Minus/⌘+NumPad Plus on macOS. To configure the default code folding behavior, go to Settings/Preferences | Editor | General | Code Folding.
The live templates for and forr now suggest relevant variable names.
For example, names like
index are suggested for an
line are suggested for a
The live template meth now provides code suggestions for receiver names.
Search only in a selected area when using Find (⌘+F on macOS and Ctrl+F on Windows/Linux). Simply select the piece of code you need in the editor and invoke Find – the IDE will then perform the search only in the selected area. To easily switch to searching within the whole file, press ⌘+F/ Ctrl+F a second time, or toggle the In Selection option in the bar.
Now, when you search in the Find in Path dialog using a file mask, GoLand shows the file extensions in the search results accordingly. This makes it easier for you to distinguish between files with the same name but with different file extensions.
In GoLand 2018.2, we added an option to share a file watcher configuration among different projects using the options Project and Global – it’s called a Global File Watcher.
However, you would have still needed to enable this watcher in each new project. Now, it’s possible to enable this watcher by default in all new projects you create or open.
In the menu File, select Other Settings | Settings for new projects, then go to Tools | File Watchers, add a new global watcher, and then select the checkbox next to it to enable it in all new projects.
Often there’s not enough time to read the What’s New pages, release notes, and blog posts about the product you use, while you need to finish your project and meet the deadline. That’s why we’ve added Tutorials for you to learn about GoLand features when you are ready.
You can find Tutorials on the welcome screen, above your project list. When you upgrade the IDE to a new version, there will be a lesson covering the features from the new release. Alternatively, you can access Tutorials via a corresponding tool window from any project.
There is a new option to analyze the callees’ method hierarchy in the Hierarchy tool window. We’ve added two dedicated buttons that let you switch between the callers and callees of the selected method. Also, now you can sort the elements within a tree alphabetically, by clicking a special button in the menu. To see the Hierarchy tool window in the Tool Windows list, you need to build a hierarchy first and then go to Navigate | Call Hierarchy or Navigate | Type Hierarchy.
In GoLand 2019.3, you can install and uninstall any theme plugins and keymap plugins without restarting the IDE.
Set your custom shortcut for the action that takes the focus back to the editor, instead of using ESC. Find the Focus Editor action in references/Settings | Keymap, right-click it, and select Add Keyboard Shortcut from the drop-down.
We've added an option to make the scrollbars more visible. To do this, select the Use contrast scrollbars checkbox in Preferences/Settings | Appearance & Behavior | Appearance.
The Clone dialog is located under VCS | Get from Version control. Now you can log in from this dialog, or, if you’re already logged in, the IDE will instantly preview the lists of all repositories grouped by accounts or organizations.
Now it is easier to investigate a conflict during a merge, rebase, or cherry-pick operation. Simply click the Show Details link to get the list of commits that led to the resulting code state, and get more information about the source of the changes displayed in the Merge dialog.
GoLand 2019.3 provides basic support for MongoDB. Now you can:
It’s now easier to explore connection errors. When a connection fails, you can just click the dedicated button in the IDE to move to the search results for your error using the Google search engine.
If you’re using Bootstrap or another CSS library and have it linked from a CDN in your HTML file, you can now get completion for the class names from that library, without adding its sources to the project.
For new variables, functions, classes, and interfaces, you’ll also get suggestions for names that were already used in the same scope but haven’t been defined yet.