GoLand 2021.3 Early Access Program Is Now Open!
Today we’re starting the third Early Access Program of the year! Earlier, we published a roadmap blog post about what’s to come in the 2021.3 release. If you’re interested, go check that out.
You can get the first EAP build via the Toolbox App, download it from our website, use a snap package (for Ubuntu), or from inside GoLand, select Check IDE updates for Early Access Program in Preferences / Settings | Appearance & Behavior | System Settings | Updates.
If you’re not familiar with our EAPs, here’s a brief overview:
EAP builds let you try out the latest features and enhancements in GoLand while we continue to work on them. These builds are not fully tested and might be unstable, but this is where you can help us. By taking these builds and their new features for a test drive in your real-world projects and scenarios, you can help us polish them. This way, when the final version is released, it will work smoothly for you.
- The EAP lets you be the first to try out the newest features.
- EAP builds are free to use for 30 days from the build date. You can use this period as an extended trial of GoLand.
- We provide a series of EAP builds until a stable release is almost ready. For the upcoming version 2021.3, the EAP period will last until the beginning of November.
- In each release cycle, we reward the most active evaluators in each release cycle and people who helped us make GoLand better by sharing their product experience, feedback, and suggestions with a free 1-year GoLand subscription.
- Fresh builds come out almost every day. If you don’t want to wait for the official EAP build announcements, you can simply download our nightly builds, which are only available via the Toolbox App. Note that the nightly builds often do not meet the quality standards for official EAP builds, and they don’t come with release notes. Like EAP builds, they expire within 30 days of being released.
Now let’s look at what we have in this EAP build.
Native support for Go projects in WSL 2
This is one of the most anticipated features in the upcoming 2021.3 release.
We’re happy to announce that now you can open a project inside WSL and specify an SDK located there.
This means that you can now work with projects inside WSL in the same way as you work with projects inside Windows.
Now If you create a new project (or open an existing one) in WSL, GoLand will tell you that for these projects, you have to use Go SDK in WSL. You can download Go SDK or choose an existing one in the \\wsl$ subdirectory.
There are still some limitations. We’re continuing to improve the features, so follow updates in these corresponding tickets: GO-4377, GO-10618.
Better handling of name styles in struct tags
What’s your favorite style: camelCase, snake_case, or PascalCase? Or maybe you like using hyphens-to-separate-words?
We improved how these styles are handled when you add tags in struct fields. You will get helpful auto-completion for every style.
When you start filling out a tag, right after you type backticks, GoLand will suggest entering a key – JSON, XML, and so on. Press the Tab key, and you will see a list of four options. Choose the style of the value name. The IDE will remember your choice, and it will suggest the same style first in the list for other fields of this struct.
Postfix templates for string-to-number conversion
Postfix templates are great – they help you transform expressions that you have already typed. You don’t have to go back and break your flow.
We have a couple of new postfix templates for converting strings to numbers. Just type a number inside double quotes, then type a dot, and GoLand will suggest two options for parsing the number: parseInt and parseFloat. Choose the one you need and press the Tab key.
While we’re on the subject, let us remind you that GoLand has a useful postfix template for handling errors – just type err.nn and press the Tab key, and GoLand will generate if err != nil {} for you.
Export type quick-fix
If you wrote an exported function that returns an unexported type, GoLand will suggest a quick-fix to export the type.
New debugger UI
Our built-in debugger is a powerful tool for helping you check your code for inconsistencies and bugs. However, over the years, the Run/Debug tool window design has become overloaded, so we decided to rework it.
The new design is more modern and minimalist. There is now a single horizontal toolbar at the top of the window. We’ve removed the vertical toolbar on the left and collapsed all the others. This layout reorganization lets us save a lot of space and makes the UI more intuitive.
The most popular actions can now all be found on the horizontal toolbar. You can access the rest using the More icon (vertical ellipsis symbol). If the default configuration doesn’t work for you, you can customize it in Preferences/Settings | Appearance & Behavior | Menus and Toolbars | Debug Header Toolbar.
We’ve also made the Evaluate expression dialog more discoverable – you can now access it right from the Debug tool window.
Hide object types in the Debug tool window
One more change in the debugger – if object types take up too much space in the Debug tool window, you can right-click in the window area and untick the Show Types option in the list that appears. You can turn it back on in the same way.
context.TODO inspection
We’ve added an inspection which highlights the usages of context.TODO(). You can enable it Preferences/Settings | Editor | Inspections. This is an inspection with a weak warning. It will serve as a reminder to change context.TODO(), if at the time of writing it was unclear which Context to use.
TODO comment in the Implement Method template
We’ve also added the //TODO implement me comment to the template generated when you use the Implement Methods action. These special comments are highlighted in the editor, indexed, and listed in the TODO tool window. It will serve as a reminder about unimplemented methods.
That’s it for today! Please tell us what you think about new features. As usual, get in touch via Twitter, leave your comments here, open an issue in our tracker, or drop us a message in the Gophers Slack #goland channel. Thanks!