Memory, CPU, Mutex, and Block profilers
GoLand has expanded its tooling support by integrating Memory, CPU, Mutex, and Block profilers. You can start profiling your application right from the IDE, and then review the analysis results in a dedicated tool window (View | Tool Windows | Profiler).
To run the profiler, click the new Run with Profiler button and choose the required configuration in the navigation toolbar. Alternatively, select any of new actions in the run menu, which appears when you click on the run icon in the left gutter.
To get a better understanding of the possible performance issues in your code, sort the results by available metrics for each particular profiler type; use the Flame Chart, Call Tree and Method List tabs; or even navigate to the source code to inspect the issues.
Smart Step Into
Debugging a chain of calls and nested method calls is easier with the new debugger action, Smart Step Into. It lets you step into arbitrary calls in an expression, automatically stepping over the methods that you are not interested in.
For example, when debugging code like
fmt.Printf("My name is %s, I am %d!",
me.Age()), you can opt to specifically step into
To invoke Smart Step Into, press Shift+F7 or select Smart Step Into in the Run menu.
To learn more, see Debugging in GoLand – Improvements in 2019.1.
The Extract Interface refactoring helps you quickly create a new interface based on the selected type. To invoke it, call up Refactor This, press Ctrl+Alt+Shift+T on Windows/Linux or ^T on macOS and choose Extract Interface in the pop-up menu.
The refactoring dialog shows a list of suggested members to be transferred to the new interface. You can specify a name for the interface and choose the file, directory, or package where it should be placed. If the type already implements any interfaces, it will be automatically excluded from the list.
To learn more, see Refactorings in GoLand — Extract Interface.
More capable Rename
The Rename refactoring also helps rename methods declared in interfaces. When renaming such methods, GoLand will offer to rename their implementations as well.
The Refactoring Preview panel in the Find tool window lets you see what the current refactoring will affect, with usages grouped by their type and location in the project.
Go gives us many ways to make the zero value useful, but the more opportunities we have, the easier it is to fall into a trap.
Our brand new Nilness Analyzer is a set of code inspections designed to instantly detect whether variables might have nil or not nil values in a variety of cases, and alerts you about potential errors and problems.
To learn more, see Nilness Analyzer Inspection.
Goroutines instead of threads
The debugger output now displays goroutines instead of threads. Switch between them, quickly navigate to standard Go libraries, and get more information about how your code is being executed.
Also, use Copy Stack (right-click on the goroutine list) to copy the whole frame stack to the clipboard.
View int as binary, decimal, or hex
You can now choose whether to display int variables in the debugger views as binary, decimal, or hex. Right-click a variable and select the appropriate or preferred option under View as.
Run to Cursor as mouse gestures
The Run to Cursor action is now available by clicking on a line number while debugging. Hover over a line to highlight it. Click a line number to Run to Cursor.
Support for minidumps
In addition to exploring core dumps, now you can also open and analyze windows minidumps right in the IDE. Like with core dumps, it’s as easy as selecting Run | Open Core Dump.
To learn more, see Debugging in GoLand — Windows Minidumps.
Run Go configurations with sudo
Run/Debug Configurations can now be run with sudo. It allows you to debug applications which require privileged operations as a user.
Support for theme customization
Not enough purple? Too boring? Too fun? No problem any more! Starting with 2019.1, all IntelliJ-IDEA-based IDEs get fully customizable colors of all their UI elements. You can literally change the color of anything!
We've made this customization pretty easy to do. Learn how to create and share your own themes in this tutorial.
Install any Go SDK right from the IDE
When creating a new project in GoLand, there is now the option to download and install any required version of the SDK, including Beta and RC versions. You don’t have to leave the IDE or go surfing through the Web anymore.
As soon as the selected SDK version is installed, GoLand will notify you in the Event Log window.
Go Modules updates
The Go Modules projects template gets a new Vendoring mode checkbox, which lets you use libraries from the vendor folder without any external dependencies or connection to the Internet. The same checkbox is also available via settings in Preferences | Go | Go Modules (vgo).
Completion for non-imported modules
GoLand provides code completion suggestions for all modules in the modules cache as you type. This means that, even if a module has never been imported and used in your project, GoLand is still aware of it.
New Intention Actions
Set of declaration intention actions
We’ve added a set of intention actions to help you reformat declarations the way you want: add/remove parentheses to/from a declaration, merge a declaration up, split a declaration into two groups, by comma, and more.
For the complete list of available actions and their detailed descriptions, go to the Declaration section of Go in Settings/Preferences | Editor | Intentions.
Export intention action
A new Export intention action lets you export a private function, type, or field without switching between packages.
In addition, GoLand now resolves references to unexported symbols, but it will still notify you that it’s an error.
Handy general changes
Sublime Text keymap
The new pre-configured Sublime Text keymap is available at Preferences | Settings | Keymap.
Note you can also use the pre-configured VS Code keymap, available via this plugin.
Recent Locations popup
The Recent Locations popup (Cmd-Shift-E /Ctrl+Shift+E) is a new way to navigate around the project. It shows a list of recently visited/changed code locations as code snippets with a couple of lines before and after the location. To filter the results, start typing and jump matching piece of code.
Project templates for web development
Project templates for web development, such as React App, React Native, HTML 5 Boilerplate, and Foundation, are available from the Welcome screen.
Export 'Code Style' settings to JSON
Now it is possible to export Code Style settings to JSON. This is in addition to the already available option of exporting to XML, available under Preferences /Settings | Editor | Code Style.
Version control improvements
'Uncheck all' checkbox for Partial Git
The new Uncheck all checkbox for Partial Git commits (
-p) lets you uncheck all the
code chunks at once, and lets you choose the ones you want to commit, too.
'Fixup' and 'Squash Into' actions
The Log tab in VCS gets Fixup and Squash Into actions to create commits with the correct fixup! and squash! messages.
Also, you can now use the context menu on the Log tab to cherry-pick selected files from the commit.
Indication of incoming & outgoing commits
If you go to Preferences/Settings | Version Control | Git and select Mark Branches that have incoming/outgoing commits in the Branches popup, the IDE will indicate if the incoming and outgoing commits are available for individual branches.
Author initials in annotations
In addition, the IDE gives you a choice to display the initials of authors instead or their full names in VCS annotations.
Even more changes
- Multiple defaults in switch code inspection warns you about redundant default cases in a switch statement and lets you quickly navigate to the duplicated default.
- The Duplicate names code inspection now notifies you if dot import introduces a duplicate.
- In the Project view, the files and folders that are ignored now use olive-green to help you distinguish them from other files. You can modify the color of these in Preferences/Settings | Version Control | File Status Color.
- Settings of JetBrains-made plugins are searchable in the Preferences/Settings dialog.
- Copy & paste text to the Blank Diff window by dragging a file to it. Alternatively, you can do the same through file navigation.
Destructuring lets you unpack values from arrays and objects into variables using a very concise syntax.
GoLand 2019.1 delivers a new set of refactorings, intention actions, and quick-fixes to help you start easily destructuring objects and arrays in your code.
Convert Promise to async/await
The new Convert to async function intention action automatically changes a function
returns a promise with
.catch() calls to an async
function that uses the
press Alt+Enter on the name of the function you want to convert.
Highlighting for failed line in test
GoLand lets you quickly determine where the problem with the failed test has occurred. IDE highlights related code in the editor, and on hover, you’ll see the error message from the test runner.
This works with Jest, Karma, Mocha, and Protractor.
Updated docs for CSS
The documentation (F1) for CSS properties, HTML tags, and attributes shows actual descriptions and information about the browser support from MDN.
Also, now you can use a new compatibility inspection via Browser compatibility in Preferences/Settings | Editor | Inspections – CSS. Simply select the minimum browser version you want to target.
- Greenplum, Vertica, and Apache Hive databases are supported.
- The Remember password feature now has two options for storing passwords: Forever and For session.
- We've completely reworked the connection dialog.
- New keep-alive and auto-disconnect options.
- The filter in the data editor suggests the clipboard.