Go logo

GoLand

A cross-platform Go IDE with extended support for JavaScript, TypeScript, and databases

Releases

GoLand 2021.3.3 Is Available!

The GoLand 2021.3.3 update is out. You can download the build from the website, update via the Toolbox App, apply a patch (go to GoLand | Check for Updates), or use a snap package (for Ubuntu).

Let’s see what’s inside. 

Quick-fix for switching to a newer Go SDK 

If your project contains generics, but Go SDK for this project is lower than 1.18, GoLand will suggest a quick-fix for switching to the 1.18 version. If you don’t have the 1.18 version, it will be suggested to download. You can try this and some other generics-related features in our Generics (type parameters) lesson that is available on the Welcome screen in the Learn GoLand section.   

GoLand also checks the Go version in your go.mod file and suggests a quick-fix to change it if you use generics and the Go version is incompatible with generics. 

Support for underlying type constraints

Functions with underlying type constraints are now supported, and GoLand no longer shows a “missing function body” error.  

The “Exported element should have a comment” inspection is enabled by default 

We’ve enabled by default an inspection that checks whether you added a comment to your exported element. The severity level of that inspection is “No highlighting, only fix”.

With that severity level, the inspection will not highlight the code, but you will still be able to get the “Add comment” quick-fix.

If you want to change the severity level, go to Preference/Settings | Editor | Code Style | Inspections. In the dropdown list, go to Go | Code style issues

Unused variable passed to a closure is reported as an error

GoLand now reports an unused variable passed to a closure as an error if you set your Go SDK to 1.18. 

Other improvements and bug-fixes

In this release, you will also find some notable bug-fixes, such as: 

GO-12171 – The “Cannot use … (type …) as the type any” error has been fixed. 

GO-12067 – The link to pkg.go.dev in a Quick Documentation popup is back. 

GO-12266 – An error for an empty list of type arguments is reported, as expected. 

IDEA-281375 – GoLand doesn’t run formatter on save on syntactically invalid files. 

Overall, more than 30 generics-related issues have been fixed in 2021.3.3. Please read the release notes for more details about this update.

image description