What's New in GoLand

GoLand 2022.3 offers performance enhancements, as well as new features for generics and Go workspaces.

We’ve integrated Go Playground, added support for improvements to Go doc comments, introduced new features for HTTP Client and Docker, and made the new UI available.

As usual, you will find new features for web development and databases, like Redis support.

If you prefer an interactive approach to learning, we invite you to complete the What's New in GoLand 2022.3 tutorial from the Welcome screen.

Last but not least, GoLand turns 5 years old today and we invite you to celebrate with us. Type "Happy B-day, GoLand!" in GoLand 2022.3 or GoLand 2022.2.5 and see what happens!

Performance improvements

The Background Tasks window showing indexing and go list running

go list changes to improve indexing

When you open a project, GoLand indexes the files and runs the go list command, which reports information about the project structure. Indexing is paused while go list is running, and you don’t have access to code insight features until indexing is finished.

Previously, GoLand would run go list twice in some cases. We’ve changed our API and reduced the number of go list launches. We hope that this change significantly improves performance for large projects with many modules.

Restore project structure from cache on open

Now when you open a project, the information reported by go list is saved to the disk in cache memory. When you open that project again, the data about the project’s structure is loaded from memory and considered when indexing starts.

Thanks to this, indexing continues without pauses and finishes faster, and the code insight features are available much sooner after opening the project.

Faster IDE startup and project opening

GoLand has received a number of other performance improvements designed to decrease the time it takes to launch applications and open projects in JetBrains IDEs.

As a result, overall startup performance – including editor restoration – has been improved by around 30%.

Generics

Generating a test for a generic function

Test generation for generic functions

You can now generate tests for functions with generic parameters.

Quick-fix that deletes type parameters with empty parameter lists

Quick-fix to capitalize type parameters

We now have an inspection that detects lowercase type parameters, as well as a quick-fix to make them uppercase.

Go workspaces

Using the Go Workspace File action

The Go Workspace File action

In the New context menu, you’ll now find the Go Workspace File action. When you select it, a go.work file will appear in your root folder. Existing Go modules will automatically be added to the go.work file.

Generating go.work using replace directives

Generate go.work using replace directives

You can now generate go.work from go.mod if you have replace directives there. Place the caret on a replace directive, press Alt+Enter to see all available intention actions, and select the Add … module to workspace quick-fix.

Go doc comments

Go 1.19 has added support for links, lists, and new headings in doc comments. GoLand 2022.3 also supports these new features.

Text and doc links are shown in the Quick Documentation popup and the Documentation tool window

Support for links

We've added references to doc links in GoLand. Clicking on them leads to the referenced element, while clicking on a text link leads to a text-link definition.

Both text and doc links are rendered as links in the Quick Documentation popup and the Documentation tool window.

New headings are shown in the Documentation tool window

Support for new headings

Starting from Go 1.19, a heading is a line that begins with a number sign (#) followed by a space and the heading text.

New headings are rendered as HTML headings in GoLand's Quick Documentation popup and the Documentation tool window.

Lists are shown in the Documentation tool window

Support for lists

Lists are rendered as HTML lists in GoLand's Quick Documentation popup and the Documentation tool window.

Integrated Go Playground

Using the Go Playground from inside GoLand

We've integrated the Go Playground functionality inside GoLand.

You can select a piece of code, choose the Open In option, and then click Playground. This will open a scratch file with a toolbar that contains the same options you have when using Go Playground.

You can format and share your code, change the Go version, run your code using the Go playground server, or run it locally.

New quick-fixes

Using a quick-fix to turn a type into a pointer

Quick-fix for invalid recursive type

If your type contains itself, you will get an "Invalid recursive type" error. To avoid this, you should include a pointer to a type, not a type itself. We now have a quick-fix for that.

Editor

Code author's name is shown in the Editor

Code Vision

We've started implementing the Code Vision feature. For now, the code authors are displayed if version control integration is enabled. If you click on a code author's name, the Annotate with Git blame sidebar opens, letting you see who introduced various changes.

Usages displayed near functions and types

We've also introduced usages displayed near all functions and types that show how many times the function or type is referenced in the current project.

Inlay hints for constant definition blocks are shown in the Editor

Inlay hints for constant definitions

GoLand now shows inlay hints for constant definition blocks. This is particularly useful in iota-derived constant blocks, where the hints show the iota values associated with each position.

Auto-generated protobuf fields are ignored after invoking the Fill all fields intention action

Auto-generated protobuf fields ignored for Fill all fields

The IDE now ignores auto-generated protocol buffer fields that start with XXX_ when you invoke the Fill all fields intention action. These fields are shown only after you invoke completion for the second time.

Other Go-related features

Go environment variables are displayed in the settings

Go environment variables displayed in the settings

GoLand now automatically picks up system variables related to Go modules and displays them in the Environment variables dialog window. To open this window, go to Settings | Go | Go Modules and click on the Edit environment variables icon.

Package names are shown in Quick documentation

Package names always shown in Quick documentation

The IDE now always shows package names in the Quick documentation popup for top-level declarations. Previously, package headers were shown only when doc.go or <pkg_name>.go files were found.

Increased file size limit

We've raised the file size limit from 2.5 MB to 10 MB. Code insight features, like navigation and highlighting, don't work for files that exceed the size limit.

While the 2.5 MB limit was enough for most files, there are projects with files bigger than that – for instance, the AWS SDK or GCP.

The Receiver names are different inspection ignores generated code

Since the Receiver names are different inspection is not relevant for generated code, we've disabled it for files that contain a comment matching the following regular expression: ^// Code generated .* DO NOT EDIT\.$

HTTP Client

Writing a script block in the HTTP client

Pre-request scripts and new APIs for JavaScript handlers

The HTTP Client now supports executing script blocks before requests. You can generate data before executing a request and put it in the final request using variables. A quick-fix is available that will create the boilerplate code for initializing variables.

Computing the md5 or sha1 hash values for HTTP requests

The HTTP Client now supports the Crypto API. You can compute the md5 or sha1 hash values for HTTP requests.

Using random values in HTTP requests

For simple cases, the IDE now features a new set of random variables.

Docker

The Docker settings in GoLand on Windows

Docker executable from WSL without Docker Desktop

GoLand now supports connections to Docker that run in Windows Subsystem for Linux (WSL). You can set up such a connection in Settings | Build, Execution, Deployment | Docker.

Using a quick-fix to pull an image

New intention action: Pull Docker image

There is now an easy way to pull a required image without running it from a Dockerfile or docker-compose.yml. For this, call up the context actions (Alt+Enter) on the highlighted image name and then select Pull Docker image.

Using code completion in a dockerignore file

Support for the .dockerignore file type

We've introduced full support for .dockerignore files, including code highlighting and completion. These files are now taken into account when you build an image from the IDE.

Heredoc syntax is highlighted in GoLand

Support for the heredoc format in Dockerfile files

Here documents allow you to redirect subsequent Dockerfile lines to the input of the RUN or COPY commands. GoLand now supports this syntax, so you can use it to generate config files or multiline scripts right in your Dockerfile files.

Setting up additional Docker connections using Docker Contexts

Docker Connections From Docker Contexts

You can now set up additional Docker connections using Docker Contexts if you already have these settings in your Docker config. You can do so by calling the Add Service context menu in the Services view and selecting Docker Connections From Docker Contexts.

Remote development (Beta)

The Remote Development section on GoLand's Welcome screen

Your IDE backend can now launch directly in WSL 2, and you can connect to it the same way you would connect to any remote machine when using remote development in GoLand.

User interface

The New UI Preview section in the settings

New UI available

As you may already know, this May we announced a closed preview program for the new UI in JetBrains IDEs.

We invite you to switch to the new UI in Settings | Appearance & Behavior | New UI Preview, give it a test drive, and share your thoughts about this change with us.

Using the preview functionality for intention actions

Intention action preview enabled by default

The preview functionality for intention actions is now switched on by default, so you can instantly see how your code will be altered once you apply the IDE's suggestions.

You can enable or disable the preview feature by pressing Ctrl+Q while the list of intention actions is open.

Dragging a tool window out of the main window and docking it to a floating editor tab

Dock tool windows to floating editor tabs

To make it easier to arrange your working space and interact with GoLand on multiple monitors, we've implemented the option to drag tool windows out of the main window and dock them to floating editor tabs.

The Tip of the Day window

Improved Tips of the Day

We've enhanced the Tips of the Day feature, a learning tool that helps you explore GoLand.

Each tip now has a heading. We've also fine-tuned the algorithm that determines which tips appear so you'll see the ones that are most relevant to your experience with the IDE and the project you're working on.

Bookmarking a file from an editor tab

Updated bookmarks

It is again possible to bookmark files from editor tabs. Just right-click on a tab to invoke the context menu and select Bookmarks.

Adding all the files in currently open tabs to bookmarks

You can add all of the files in all currently open tabs to Bookmarks. To do this, either invoke the same context menu and select Bookmark Open Tabs, or call this action using the three dots icon located on the right-hand side of the editor tabs pane.

The Settings Sync section in GoLand's settings

New Settings Sync solution

We've introduced a reworked solution to synchronize your custom user settings. For quite a long time, there were two plugins that existed in parallel and featured intersecting functionality – IDE Settings Sync and Settings Repository. To avoid the confusion from having two similar bundled plugins, we've merged their feature sets into a single solution – the new Settings Sync plugin.

You can find details about the new unified solution here.

Databases

Note: to learn about all of the updates for databases in the 2022.3 version, head over to the DataGrip What's New page.

Selecting a connection to Redis in the Database tool window

Redis support

A preliminary iteration of long-awaited support for Redis has been implemented.

Filtering objects while using quick search in the Database tool window

Quick filter

Now, when using quick search, you also have the ability to filter objects. All non-matching objects will be hidden.

Web development

Note: to learn about all of the web development improvements in the 2022.3 version, head over to the WebStorm What's New page.

Code author's name and the usages metric are shown in the Editor

Code Vision for JavaScript and TypeScript

This version introduces the new Code Vision feature for web development. It gathers various metrics for types and type members in your JavaScript and TypeScript code and displays this information near their declarations.

Other updates

Using a quick-fix to suppress an inspection in a YAML file

Quick-fix to suppress inspections in YAML

There's a new quick-fix to suppress inspections with a comment in YAML files, including Kubernetes files, OpenAPI specifications, and docker-compose.yml files.

We've also introduced an option to fold multiline comments that make up a block of 3 or more lines and start with #.

Installers for Windows ARM64

We've started distributing installers for Windows ARM64. You can already download them from our website or the Toolbox App.