What's New in GoLand

GoLand 2022.2 offers new features for generics and go.work. We’ve also added support for fuzz tests.

SQL statements are now automatically detected, and you get comprehensive code assistance for them.

GoLand now supports WebSocket connections and can send GraphQL queries over HTTP and WebSocket protocols.

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


Intention action that replaces empty interface with any

Intention action to convert empty interfaces to any

GoLand now has an inspection that reports the usage of an empty interface as a type or type constraint.

There is also an intention action that replaces interface{} with any. From the intention action’s popup, you can replace all empty interfaces in a file.

Quick-fix that deletes type parameters with empty parameter lists

Quick-fix to delete type parameters with empty parameter lists

Type parameters with empty parameter lists are now reported as errors. We’ve added a quick-fix to delete them.

Inspection for unused type parameters

Inspection for unused type parameters

We’ve added a new inspection that reports unused type parameters. They are grayed out, and you will see a warning when you hover over them.

Inspection for union of interfaces with methods

Inspection for union of interfaces with methods

The IDE now reports an error if you attempt to use interfaces with methods in unions.

Inspection for usage of a type parameter as a constraint

Inspection for usage of a type parameter as a constraint

If you try to use a type parameter as a constraint, GoLand will display an error.

GoLand inserts a type parameter’s identifier while a method is created.

Completion for type parameters when typing a method’s receiver

GoLand automatically inserts a type parameter’s identifier when you add a receiver while creating a method.

New Find Usages group

New Find Usages group for type parameters

We’ve introduced a new Find Usages group for generics: Type parameter declaration.

Fuzz testing

Running fuzz tests in GoLand

Running fuzz tests

You can now run fuzz tests from GoLand. If you click on the green triangle icon in the gutter next to your fuzz test, you will see different options for running the test. If the test fails, the failing seed corpus entry will be written to a file and placed in your package directory in the testdata folder.

The path to this file will also appear in the console as a clickable link. If you click on the link, the file will be opened in the IDE, and you will see a green triangle icon at the top of the file. Clicking on this icon will run go test with the failing seed corpus entry.

From GoLand you can also run fuzz tests just like normal unit tests.

Quick-fix to change the Go SDK to a version that supports fuzzing

Quick-fix to change the Go SDK

In GoLand, you will now no longer see a run button in the gutter if you’ve configured a Go SDK that doesn’t support fuzzing. We've added a quick-fix to change the Go SDK if the current Go SDK doesn't support fuzzing.

Go workspaces

A quick-fix that groups multiple use directives into one directive

Quick-fix for grouping multiple use directives

We’ve added a quick-fix that groups multiple use directives in a go.work file into one directive.

Go 1.19

Adding a format string argument for Appendf

Support for fmt.Appendf

We’ve added support for fmt.Appendf, and now GoLand identifies formatting verbs inside strings. As a result, the Appendf function benefits from all of the features that formatting functions have, such as the Add a format string argument intention action.

Support for the unix build constraint

GoLand now supports the new unix build tag, which recognizes any Unix or Unix-like system.

Addition of loong64 to the Arch list

Go 1.19 is introducing a new architecture – loong64. We’ve added it to our Arch list in Settings | Go | Build Tags & Vendoring.

Quick Documentation

We’ve improved Quick Documentation:

  • For each of the 25 Go keywords, GoLand now displays a meaningful keyword tooltip outlining the semantics of the relevant keyword.
  • We now display channel direction information. This data is shown in tooltips in three places: when you hover over the chan keyword, on channel send and receive operations, and on all references to channel types.
  • Quick Documentation for iota now contains additional information about how to use it. If a constant is part of an iota group, the value is now shown in the completion box, even if the constant is defined implicitly.
  • There’s also a new tooltip explaining how type switches work.
  • If you invoke Quick Documentation on a type parameter, GoLand will show you a tooltip with a brief explanation of how generics work and a link to a tutorial by the Go team.
  • The tooltip for type assertions now contains additional information about them and offers examples.
  • GoLand displays additional information when you initialize maps, arrays, slices, and structs if you hover over the area inside the curly braces.
  • If you hover over a blank identifier, GoLand shows a tooltip with information about what the blank identifier is and how it works.

More Go-related improvements

Performance optimization

GoLand no longer scans the cache subdirectory in ~/go/pkg/mod since it doesn’t contain information needed for the IDE to work correctly. This folder can be fairly large, and we believe that excluding it from the scan will improve performance.

Support for the go:linkname directive

We've added support for the go:linkname compiler directive:

//go:linkname localname [importpath.name]

It instructs the compiler to use importpath.name as the object file symbol name for the variable or function declared as localname in the source code.

Irregular usage of iota inspection

Irregular usage of iota inspection

There is a new inspection in GoLand that will warn you if iota is used irregularly.

Warning about trying to assign a value to a constant named iota

We’ve also enabled the Reserved word used as name inspection for iota and other built-in constants. The inspection will be triggered if you try to assign a value to a constant named iota, true, or false.

Warning  about a type that has methods on both value and pointer receivers

Inspection for methods on both value and pointer receivers

The Go documentation recommends that all methods on a given type should have either value or pointer receivers.

There is a new inspection in GoLand that will warn you if your type has methods on both value and pointer receivers.

Automatic SQL detection

GoLand detects SQL statements.

SQL statements are now automatically detected and the language is injected into every string literal that matches a certain pattern. When you inject a language into a string literal, you get comprehensive code assistance when editing that literal.

Settings for editing patterns

You can find the patterns, edit them, and add your own in Settings | Editor | Language Injections.

Run Anything

The Run Anything action

GoLand now supports the Run Anything action that allows you to quickly launch run/debug configurations, applications, scripts, commands, and tasks, as well as open recent projects. To use it, just press Ctrl twice and start typing in the search bar.

HTTP Client

Sending a message through a WebSocket connection

Support for WebSocket endpoints

GoLand now supports WebSocket connections. You can create requests as well as send and receive messages.

Sending a GraphQL query

Support for GraphQL endpoints

GoLand can now send GraphQL queries over HTTP and WebSocket protocols out of the box. For http:// and https://, simple HTTP requests are used, while ws:// and wss:// are delegated to the WebSocket executor.

Selecting a run environment in the HTTP client

Select a run environment

There is now a way to select a run environment from the play icon on the gutter. To enable this feature, choose the Select Environment Before Run option from the Run with combobox.

Remote development

The Remote development section on the GoLand Welcome screen

We’ve updated the Remote Development section on GoLand’s Welcome screen. Here you can choose your preferred method for backend orchestration. Also, the port forwarding functionality is now available for processes running on the terminal.

You can find more details about the new remote development features in this blog post.


Space integration is now bundled with GoLand

JetBrains Space is a complete software development platform that provides project management, issue tracking, Git hosting, code reviews, continuous integration, package repositories, and remote backend orchestration for JetBrains IDEs through dev environments.

Space integration is now bundled with GoLand. With this first-class integration, you can browse Space projects and clone repositories, then start working on them directly. When your changes are ready, you can create a merge request and perform a code review from within the IDE.

You can now manage your Space dev environments for remote development directly within GoLand

You can now manage your Space dev environments for remote development directly within GoLand.

When your IDE is connected to your Space organization, all of your existing dev environments are synchronized. You can create a new dev environment for a repository and branch, and start coding right away. You can hibernate a dev environment to reduce resource consumption or simply delete it when your work is finished.

User interface

Merging project windows

Merge All Project Windows action on macOS

For macOS users, we’ve introduced the ability to merge all open project windows by turning them into tabs within a single window. To do this, go to Window | Merge All Project Windows.

Changing the font size with a shortcut

Keyboard shortcut to change the font size

We’ve introduced a keyboard shortcut that changes the font size everywhere in the editor. To increase the font size, press Alt+Shift+. To decrease it, press Alt+Shift+,

When you zoom into or out from your code within the editor, you can now see an indicator that shows the current font size and the option to revert it back to the default.

Using the Description field while adding a bookmark

New Description field for mnemonic bookmarks

We’ve integrated a Description field into the Add Mnemonic Bookmark dialog so that you can add an optional description to your bookmark. To add a mnemonic bookmark, right-click the gutter next to the line you want to bookmark and choose the corresponding option from the context menu. Or you can use the shortcut Ctrl+F11.

The Welcome screen

Cloning repository progress bar

The Cloning repository progress bar is now shown right in the Projects list.

The popup window that provides access to Code Completion Settings

Faster access to Сode Сompletion Settings

You can now access Code Completion Settings from the vertical ellipsis menu button in the code completion popup.


Code completion Settings

Control automatic parentheses insertion

We've added the option to toggle whether the IDE automatically inserts parentheses during code completion.

Settings window with the new Highlighting in editor dropdown menu in the bottom right-hand corner

Change the highlighting style for inspections

You can adjust the highlighting style for inspections using the new Highlighting in editor dropdown menu in Settings | Editor | Inspections.

This provides you with more options for customizing inspections. For example, you can set the severity level of a particular inspection to Warning but change the highlighting style to Error.


The Copy Docker Image action

Copy Docker Image

You can now copy images from one Docker daemon to another using the new Copy Docker Image action, which saves the image to a file and then pushes it to the chosen connection.

Docker auto-connection on IDE restart

GoLand now automatically connects to Docker after you restart the IDE. This new setting is enabled by default in Settings | Advanced Settings | Docker.

Integration with Colima and Rancher

GoLand is now integrated with Colima and Rancher to support more options for establishing connections to a Docker daemon.


Importing multiple CSV files

Option to import multiple CSV files

You can now select several CSV files and import them all at once.

The Script and Playground resolve modes

Resolve modes for databases

When working with databases, you now have two file resolve modes: Playground and Script.

Playground is for when you have a set of unconnected queries, and Script is for queries that have sequential logic.

Other improvements

Import trusted SSL certificates

GoLand can now help you import trusted SSL certificates from system trust stores. It will automatically use the custom certificates specific to your enterprise environment. You don’t need to perform any additional actions. Everything should work right out of the box.

Clickable URLs in JSON and YAML files

JSON and YAML files now feature automatically inserted web references inside values that start with http:// and https://. You can open these links in a web browser and generate requests in the HTTP client.