GoLand 2020.3 Help

Release notes for GoLand 2020.3

Debugger: dump goroutines and filter the dump results

You can find goroutines that contain a specified string in the stack and filter goroutines that you do not want to see in the dump results.

During the debugging session, click the Dump Goroutines button (the Dump Goroutines button).

A dump of available goroutines and their stacks opens in a separate tab. For more information about dumping goroutines Ctrl+Shift+F10, see Filter a list of goroutines in the dump tab.

Dump goroutines

Debugger: terminating a remote process during the remote debugging session

You can press Ctrl+F2 to terminate the remote process during the remote debugging session. Note that you cannot reattach to the process when you terminated it.

terminate the remote process

Testing: initial support for table tests

You can run individual table tests by using the Run icon (the Run icon) in the gutter. Also, you can navigate to a particular table test from the Run tool window.

Current support of table tests has the following limitations:

  • The test data variable must be a slice, an array, or a map. It must be defined in the same function as the t.Run call and must not be used after initialization (except for the range clause in the for loop).

  • The individual test data entry must be a struct literal. Loop variables used in a subtest name expression must not be used before the t.Run call.

  • A subtest name expression can be a test data string field, a concatenation of test data string fields, or the fmt.Sprintf() call with %s and %d verbs.

Run individual table tests

Testing: updates of the testify support

You can run suite.Run and suite.T().Run subtests as long as the subtest name is a string constant.

Also, you can rerun a single subtest from the Run tool window.

updates of the testify support

Code completion: benchmark and test functions are suggested when you type func

When you type func in the test file, GoLand suggests benchmark and testing live templates in the completion options.

Benchmark and testing live templates

Code completion: suggestion of the b.N condition expression in for loops

When you type for inside the benchmark, GoLand suggests b.N in the condition expression of the for loop.

go_b_n_condition_expression

Code completion: extended support for the Testify framework

When you complete a function or method that accepts testing.T as the first argument, GoLand passes that argument automatically. This feature works for functions and methods in the following packages: testify/assert, testify/require, testify/mock, and testify/suite.

Code completion: extended support for the Testify framework

Code completion: support for the time package

The time package uses predefined layouts that you can use in Time.Format and time.Parse. The reference time used in the layouts is the specific time: Mon Jan 2 15:04:05 MST 2006. It means that to define your format, you need to write down what the reference time would look like formatted your way.

In GoLand, when you press Ctrl+Space, you will see placeholders for time and data elements from ISO-8601. Code completion also suggests standard time layouts outside of the string literal.

Support for the time package

Code inspections: incorrect usage of Println/Printf like functions

The Incorrect usage of Println/Printf like functions code inspection works in github.com/pkg/errors, github.com/sirupsen/logrus, and go.uber.org/zap packages.

incorrect usage of Println/Printf

Code inspections: potentially unsafe usages of context cancellation

The context.CancelFunc not called code inspection checks that the cancel function returned by context.WithCancel and similar functions is called on all the execution paths. To learn more about the context package, see Package context at golang.org.

unsafe usages of context cancellation

User interface: reworked Welcome screen

The Welcome Screen of GoLand has UI and UX updates. Now you can perform the following actions from the Welcome Screen:

  • Search for projects

  • Customize color themes, IDE fonts, import actions, and sharing preferences

  • Expand the functionality with plugins

  • Learn more about GoLand features from tutorials

reworked Welcome screen

User interface: the IDE theme synchronizes with your OS preferences

Depending on your OS preferences, the IDE theme switches automatically between dark and light themes.

To enable this option, open settings by pressing Ctrl+Alt+S and navigate to Appearance & Behavior | Appearance.

IDE theme is synchronized with your OS preferences

Search: mathematical expressions in Search Everywhere

Press Shift twice and enter a mathematical expression.

mathematical expressions in Search Everywhere

Spell checker: improved spelling and grammar checkers

To apply a suggestion of a spell checker, press Alt+Enter and select the most appropriate suggestion.

The LanguageTool grammar checking engine improves the review quality in English and adds support for more than ten additional languages.

improved spelling and grammar checkers

User experience: drag tabs for split-screen mode

Drag a tab to any area of the editor to activate split-screen mode.

drag tabs for split-screen mode

User experience: reworked VCS menu

GoLand detects the version control system that you are currently using and displays corresponding menu items. Before GoLand 2020.3, these menu items were hidden in a submenu.

reworked VCS menu

User experience: improvements in the Project tool window

In the Project tool window (View | Tool Windows | Project), press Space to see a preview of the file in the popup window.

preview of the file in the popup window

If you select a file in the Project tool window and press Shift+Enter, GoLand opens a file in split-view mode.

split-view mode

General: plugins per project

You can enable or disable a plugin only for the current project. A plugin is loaded when you open the project that requires the plugin and unloaded when you close the project.

plugins per project
Last modified: 15 October 2020