Go logo

GoLand

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

Early Access Program

GoLand 2021.3 Goes Beta!

GoLand 2021.3 has reached the Beta milestone! It means that we have stopped adding new features. During the next few weeks we will be fixing bugs and getting GoLand ready for the major release at the end of November. 

This is the last build in the EAP cycle that does not require a subscription. The Beta version is more stable than EAP builds, but there still may be some bugs so keep that in mind. 

What’s new:

You can get the 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

Download GoLand 2021.3 Beta

Native support for Go projects in WSL

[To the top ↑]

Starting from this release you can work with projects inside WSL in the same way you work with projects inside Windows. Simply open a project in WSL and specify an SDK located there. 

If you create a new project (or open an existing one) in WSL, GoLand will tell you that you have to use a Go SDK in WSL. You can download a Go SDK or choose an existing one in the \\wsl$ subdirectory. Please be aware that there are still some limitations.

WSL

gofmt on save by default

[To the top ↑]

The Reformat code option, which lets you run both gofmt and GoLand’s own formatter every time you press ⌘S (Ctrl + S), is now enabled by default. This option has been requested by many users, and it’s been on our to-do list for quite a while.  

gofmt

The change might take some users by surprise, so we’ve added a notification that will display once in every project. You can turn it off by clicking Don’t show again.

gofmt notification

The Optimize imports option has also been enabled on save. You can manage the Reformat code and Optimize imports settings in Preferences/Settings | Tools | Actions on save. For instance, you can enable different options for different types of files (Go files are selected by default).

Inline Method and Inline Function

[To the top ↑]

The long-awaited Inline refactoring for functions and methods is now available. To try it out, place the caret on a function, method, or invocation and then press⌥⌘N (Ctrl + Alt + N).

When you invoke the Inline refactoring, a popup window opens with several options. From this popup you can also open the Refactoring Preview, which helps you find all the invocations of a method or function.  

Keep in mind that there are still some limitations, and we are continuing to work on this feature. 

Better handling of value styles in struct tags

[To the top ↑]

We’ve improved how different styles of writing compound words – camelCase, snake-case, etc. – are handled when you add tags in struct fields. You will now get helpful auto-completion suggestions for every style.

When you start filling out a tag, right after you type the backticks, GoLand will suggest entering a key – JSON, XML, and so on. Press the Tab key to see a list of four options. Choose the value you need. The IDE will remember your choice, and it will suggest the same style first in the list for other fields in this struct.

name style struct tags

New postfixes for string-to-number conversion

[To the top ↑]

Postfixes help you transform expressions you’ve already typed to give you that extra productivity boost. 

We have a couple of new postfixes 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.  

postfix string to integer conversion

Source preview for Show Usages

[To the top ↑]

The Show Usages feature (⌥⌘F7 / Ctrl+Alt+F7) has received a nifty improvement in this release. You can now turn on the source code preview for a found usage by clicking the square icon. 

preview source

Run targets

[To the top ↑]

Configure folders for sources and executables

You now have the option to give meaningful names to the folders on the remote machine where the sources and executables for your project are stored. Previously, these folders’ names were created randomly. 

To configure the folders, go to Run | Edit Configurations | Manage targets | Additional Settings and enter paths in the Project sources directory and Compiled executables directory fields.

ssh sources settings

Project-wide default run target

This feature will be useful for those who run several configurations on the same target. 

It is now possible to set a project-wide default run target. Go to Run | Edit configurations | Manage targets, and a window will open containing the Project default target option. 

If you choose a particular target for the project, it will be used for all new configurations.

default run target

Proxy support for SSH connections 

You can now specify a proxy server for your SSH configurations.

Go to Preferences/Settings | Tools | SSH Configurations. Here you will see the new HTTP/SOCKS section, where you can specify hostname, port, credentials, and other settings. 

It is also possible to sync your SSH proxy settings with the global IDE ones. To do so, tick the Use global IDE proxy settings checkbox.

ssh proxy

Debugger

[To the top ↑]

Better representation of nil interfaces 

Interfaces in Go have two components, a type and a value of that type. For an interface to be nil, both of these components must be nil

If in your program you have an interface with a value containing a nil pointer, that interface will not be equal to nil, because the inner type is not nil. This can be confusing.

To detect such cases, we’ve changed how interfaces are represented in the debugger window. For instance, if you have an interface with an inner type *int and a value of nil, it will be shown like this:

{interface{} | *int} *int(nil)

Short package names in the Debug window 

GoLand no longer displays the full package name in the debugger’s Variables window. You will now see only the last part of the full name. This should help you concentrate on the problem without being distracted by long lines.  

Hide/show object types

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.

Delve for Linux ARM64

Starting from this version, GoLand bundles a version of Delve that is built for the ARM64 architecture, and debugging on Linux ARM now works out of the box. We’ve also improved error messaging when GoLand doesn’t bundle Delve for specific architectures. The IDE now explicitly tells you what’s wrong. 

Template for testify assertions

[To the top ↑]

In this release, we’ve added a new template for table tests with testify assertions. If you have already used assert in your package, GoLand will generate a template with assertions when you press ⌘N (Alt + Ins) and choose the option you need.

assert template

New quick-fixes

[To the top ↑]

Quick-fix for error string formatting 

GoLand has an inspection that warns you about the incorrect formatting of error strings: “Error strings should not be capitalized or end with punctuation”. 

We now also have a quick-fix for that inspection. Press ⌥ ↩ (Alt + Enter), and GoLand will suggest fixing the string’s format.

fix error string format

Export type quick-fix

If you write an exported function that returns an unexported type, GoLand will suggest a quick-fix to export that type.

export type quickfix

Other Go-related changes

[To the top ↑]

context.TODO inspection

We’ve added an inspection that highlights the usages of context.TODO(). You can enable it in 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 should be used.

to do context

TODO comment in the Implement Method template

We’ve added the //TODO implement me comment for the templates generated when you use the Implement Methods action. These special comments are highlighted in the editor, indexed, and listed in the TODO tool window, allowing them to serve as reminders about unimplemented methods.

todo implement me

go install instead of go get to install tools

Starting from 2021.3, GoLand will use go install instead of go get to install tools. This is a necessary change, since installing executables with go get has been deprecated:  

In Go 1.18, go get will no longer build packages; it will only be used to add, update, or remove dependencies in go.mod.

The Go website

Remote development with JetBrains Gateway

[To the top ↑]

GoLand now supports remote development. We have to warn you, though, that this is a Beta version, meaning the functionality is still unstable. Also, we can’t guarantee that remote development for GoLand will be fully supported in 2021.3; it might take us a little longer to polish it up.

Support for remote development is provided through JetBrains Gateway, a lightweight launcher that allows you to deploy and run the IDE on a remote server. JetBrains Gateway is bundled with GoLand, and it can be accessed from our Welcome screen.

Read about how to get started with JetBrains Gateway.

HTTP client

[To the top ↑]

Support for gRPC requests 

GoLand’s HTTP client now supports gRPC requests and provides completion for them. Start your requests with the GRPC keyword, and the HTTP client will treat them as gRPC requests. 

support for grpc requests

You can automatically generate a gRPC request in the HTTP client by clicking on the gutter icons in your .proto files.

generate grpc request

Currently the HTTP client can execute unary and server-streaming RPCs. Like in ordinary HTTP requests, the request body and responses are plain JSON files.

streaming rpc

There are several other HTTP client improvements, you can read about them here

VCS enhancements

[To the top ↑]

Checkout and Rebase onto Current for remote branches

The Checkout and Rebase onto Current action allows you to check out the selected branch and rebase it on top of a branch that is currently checked out. Until now, this action has only been available for local branches. Now we’ve added the ability to apply it to remote branches, as well. 

checkout and rebase

New Push All up to Here action

Sometimes, you may have several commits that are ready to ship, while others are still works in progress. In such cases, you may want to push only the ones you are confident about. 

You can now push commits up to the one you have selected in the Log tab of the Git tool window. To do so, pick the commit you want to stop at, right-click on it to call the context menu, and select Push All up to Here

push all up to here action

Reorganized VCS settings

We’ve made the VCS settings more discoverable and structured. The Version Control node in Preferences/Settings now lists all the available settings.

vcs settings gif

UI improvements

[To the top ↑]

Run/Debug UI

In the first 2021.3 EAP build, we introduced a new UI for the Run and Debug tool windows. We’ve collected a lot of feedback from you and realized there’s still quite a bit of room for improvement. 

We’ve decided to bring the old layout back for now and continue to polish the new UI. The only thing that is left from the new UI is the updated implementation of the Evaluate Expression feature – you can still use it right from the Debug tool window, without opening a separate dialog.

debug ui changes

Split tabs in the Run tool window

In the upcoming release you’ll be able to split the Run tool window. This can be useful when you have several configurations running simultaneously and need to see the results of all these runs.

New Bookmarks window 

We have a new Bookmarks tool window. From now on, all the files, folders, and classes that you mark as important with the F3 shortcut on macOS or F11 on Windows/Linux will be located in this window.

bookmarks window

Terminal changes

[To the top ↑]

ConPTY

GoLand’s terminal supports the new ConPTY API on Windows. We’ve addressed several problems that users were having with the old implementation, which was based on winpty, and we’ve enabled PTY on Windows by default.

With ConPTY, 24-bit colors are supported in the built-in terminal.

Typeahead

Previously, when you were typing characters in GoLand’s terminal while working on a remote machine, the IDE couldn’t display the characters as fast as it would on a local machine, because of latency.

Fortunately, this is no longer an issue because we’ve introduced typeahead support. Our built-in terminal can now predict text modifications and will instantly display them in light grey.

Web development

[To the top ↑]

Improved code completion for HTML

Code completion for HTML has been improved. Now, whenever you type a tag name or an abbreviation in the editor or invoke code completion, GoLand will show you relevant suggestions right away. Previously, it would only show them if you typed < first.

html completion

Support for URLs in import statements in ES6

There is now a quick-fix that allows you to download remote ES6 modules. The module with all its dependencies will be downloaded and linked as a project library. To give this quick-fix a try, place the caret on the import path, press ⌥↩ (Alt + Enter), and then select Download module

url support in imports

New inspection for updating packages

In this version you can update npm packages to the latest version right from the editor. Place the caret on the package version in your package.json file, press ⌥↩ (Alt + Enter), and then select Update ‘package name’ to the latest version

inspection for updating packages

Put elements on multiple lines

GoLand has an intention action for Go files that lets you quickly put arguments on separate lines, and, if needed, back on one line. We now also have a similar intention action for JavaScript projects.  

put elements on separate lines

You can read more about the web development changes in the WebStorm blog.

Databases improvements

[To the top ↑]

Aggregates

We’ve added the ability to display an Aggregate view for a range of cells. This feature will spare you from having to write additional queries.

Independent editor tabs

If you split the editor and open the same table, the data editors will now be completely independent. You can set different filtering and ordering options for them. Previously, filtering and ordering were synchronized.

split editor in database

Automatic column types in CSV files

We now automatically detect column types in CSV files. The main benefit of this is that you can sort data by numeric value. Before, data in columns was treated as text and sorting did not work as expected. 

You can read more about the databases updates in the DataGrip blog (EAP #1, EAP #2).  

Accessibility updates

[To the top ↑]

For the upcoming release, we’ve addressed some accessibility issues to make working with a screen reader more comfortable. 

IDEA-278151 – The tool window widget no longer pops up. 

IDEA-274143 – The quick documentation popup has also been disabled. 

IDEA-272536 – We’ve fixed an issue with calling the Go to Declaration dialog. 

The accessibility support on macOS has also been improved. 

IDEA-273021 – We’ve resolved several issues with voiceover focus. 

IDEA-185260 – It is now possible to create projects using a screen reader. 

What’s more, the number of sounded help tooltips has been reduced so as not to distract you when you’re coding.

***

That’s it for today! We’d like to thank everyone who has tried our EAP builds and shared their feedback with us. You can report any bugs or suggest ideas here in the comments, on Twitter, in our tracker, or in the Gophers Slack #goland channel.

image description