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:
- A new “varCheckError” Postfix Completion.
- Formatter support for grouping imports the way “goimports -local” does.
- Go 1.16 support
There are, of course, plenty of other fixes and improvements under the hood.
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,
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.
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.
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.
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.
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.
Subscribe to Blog updates
Thanks, we've got you!
Goland 2023.3 Beta Is Out!
Get the Beta build via the Toolbox App, from our website, by using a snap package (for Ubuntu), or right from inside GoLand by selecting Check IDE updates for: Early Access Program in Settings | Appearance & Behavior | System Settings | Updates. Download GoLand Beta …
The GoLand 2023.3 Early Access Program Has Started!
The Early Access Program for GoLand 2023.3 is now open!
What’s next: GoLand Roadmap 2023.3
We are going to address some of the older issues and add some fancy features in 2023.3. Check out what's coming in the next GoLand release!