Release notes for GoLand 2020.3
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.
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:
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.
Code completion: support for the time package
The time package uses predefined layouts that you can use in
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 pressCtrl+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.
Code inspections: incorrect usage of Println/Printf like functions
Incorrect usage of Println/Printf like functions code inspection works in
Code inspections: potentially unsafe usages of context cancellation
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.
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 ().
A dump of available goroutines and their stacks opens in a separate tab. For more information about dumping goroutinesCtrl+Shift+F10, see Filter a list of goroutines in the dump tab.
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.
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.
Generics: support for square brackets
GoLand correctly processes square brackets for the generics syntax instead of parentheses. Square brackets were implemented in the previous design draft for generics at groups.google.com. For more information, seeHow to use type parameters for generic programming.
Search: mathematical expressions in Search Everywhere
Press Shift twice and enter a mathematical expression.
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.
Testing: initial support for table tests
You can run individual table tests by using 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.Runcall and must not be used after initialization (except for the
rangeclause in the
The individual test data entry must be a struct literal. Loop variables used in a subtest name expression must not be used before the
A subtest name expression can be a test data string field, a concatenation of test data string fields, or the
Testing: updates of the testify support
You can run
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.
User experience: drag tabs for split-screen mode
Drag a tab to any area of the editor to activate split-screen mode.
User experience: improvements in the Project tool window
In the Project tool window ( ), press Space to see a 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.
User experience: reworked VCS menu
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
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.