Go logo

GoLand

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

Early Access Program GoLand

GoLand 2021.1 EAP 5 has a New Postfix Completion, builtin goimports -local support, better Go 1.16 support and more

We have a new GoLand 2021.1 EAP release to share with you. It has a lot of exciting new features for you to try out, including:

There are, of course, plenty of other fixes and improvements under the hood.

Download GoLand 2021.1 EAP #5

You can get the build via the Toolbox App, download it from our website, or use a snap package (for Ubuntu). Or from inside GoLand, select Automatically check updates for Early Access Program in Settings/Preferences | Appearance & Behavior | System Settings | Updates.

A new varCheckError Postfix Completion

Postfix Completions are a way to surround code with templates after you’ve finished typing it.

GoLand already has several such templates, which can be found under Settings/Preferences | Editor | General | Postfix Completion | Go.

EAP version 5 adds one more to the list, varCheckError.

How does it work? Type .vCE after an identifier that returns an error, and the IDE will automatically add default variable names and return the error from the function.

varCheckError postfix completion

Pro tip: Did you know that you can write your templates? Check out our documentation to learn how.

Support for “goimports -local” import grouping

The built-in formatter can now group imports in the same way goimports -local does.

To enable this support, head over to Settings/Preferences | Editor | Code Style | Go | Imports and enable import grouping. Then you can specify which imports should be grouped into separate blocks.

Configure goimports -local support in the IDE

Go 1.16 support

New inspection for asn1.Unmarshal usage

o 1.16 introduced a new go vet inspection for asn1.Unmarshal. It ensures that the value in which a slice of bytes is unmarshaled is not nil. We’ve implemented a similar check, and we’ve also added a quick-fix to resolve this problem.

Configure goimports -local support in the IDE

Fixed support for GOPATH-based project

With Go 1.16, we had to adjust our GOPATH-based project model to account for the new GO111MODULES variable being default everywhere.

These adjustments should resolve any difficulties involving imports not being located by the IDE after running go get or running go build not working correctly.

For more information about this problem, you can look at GO-10639 and GO-10643 on our tracker.

That’s it for today.

Check out our release notes to learn about even more issues that we’ve addressed in this build.

As usual, your feedback is invaluable to us, and we’d like to hear your thoughts about these features and about what else we can do to make your experience even better. Don’t hesitate to contact us by writing in the comments section below, opening an issue on our tracker, dropping us a line in the Gophers Slack #goland channel, or pinging us on Twitter or other social media platforms.

image description