What's New in GoLand

GoLand 2023.2 offers improved integration with Go modules, refactorings for migrating function parameters to method receivers and vice versa, and support for errors.Is and errors.As.

In this version, you will also find the new AI Assistant plugin, GitLab integration, and the Kafka plugin.

There are also improvements for the Docker integration and the Kubernetes plugin.

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

Go modules

Go modules settings in GoLand

Option to download modules automatically

We’ve implemented the ability to download Go modules automatically on project open and after each change to the go.mod file. This functionality is enabled by default, but you can turn it off at any time in Settings | Go | Go Modules.

Using the new quick-fix to update dependencies in go.mod

Intention actions to update dependencies in go.mod

We’ve added several intention actions and inspections to help you update dependencies in go.mod files faster.

Now, when you open your go.mod file, GoLand highlights outdated dependencies. You can hover over the highlighted versions of a given package and use a quick-fix to update it. You can also update all dependencies to their latest patches or major versions, and there is an option to update only direct dependencies.

The option to disable vendoring in GoLand

Option to disable vendoring

You can now disable vendoring per project, for example, when you have a monorepo containing a vendor folder used by another language. You can disable vendoring while creating a new project or at any other time by going to Settings | Go | Go Modules.

Refactorings

A use of the Migrate function parameter to method receiver refactoring in GoLand

Function parameter and method receiver migration

GoLand offers two new refactorings: Migrate function parameter to method receiver and Migrate method receiver to function parameter.

The Migrate function parameter to method receiver refactoring can convert a function to a method of a type. Migrate method receiver to function parameter does the opposite; it converts a method of a type to a function.

Error handling

GoLand now has a quick-fix that suggests converting direct error comparisons to usages of errors.Is

Support for errors.Is and errors.As

We’ve implemented two inspections that will highlight the cases where errors.Is or errors.As should be used. There are also quick-fixes that will help you refactor the existing code to errors.Is or errors.As usages.

The first inspection highlights the direct comparisons of errors. In Go 1.13 and later, errors can be wrapped using the fmt.Errorf function with the %w verb, and direct comparison of errors using the equality check may fail on wrapped errors.

The preferred way of checking for a specific error is to use the errors.Is function from the standard library. GoLand now has a quick-fix that suggests converting direct error comparisons to usages of errors.Is.

GoLand now has a quick-fix that suggests converting type assertions
                        and type switches on errors to usages of errors.As

The second inspection highlights type assertions and type switches on errors, such as err.(*MyErr) or switch err.(type), as they may also fail on wrapped errors.

The preferred way in Go 1.13 and later is to use errors.As. Our new quick-fix suggests converting type assertions and type switches on errors to usages of errors.As.

Go 1.21

Support for min, max, and clear

GoLand 2023.2 provides basic support for min, max, and clear – new functions introduced in Go 1.21.

Improvements for make

Completion options for make function argument

Completion for make function arguments

We’ve added type-aware code completion for make function invocations.

GoLand’s notification for an incorrect usage of a make function

Checks for make function arguments

GoLand can now detect errors and redundant arguments in make functions. There is also a quick-fix to remove redundant arguments, which you can access via Alt+Enter, as usual.

Other Go-related features

The receiver shown as the first parameter in the completion suggestions when a method is called directly on a type

Receiver type completion suggestion for method expressions

When you call a method directly on a type, you need to provide the receiver type as the first argument. In these cases, GoLand now shows the receiver as the first parameter in the completion suggestions.

GoLand’s error message for missing type arguments in a type’s instantiation

Generics: Improved error message for missing arguments

The error message for missing type arguments in a type’s instantiation now explicitly tells you what’s wrong.

The preview for the Wrap error handling in a closure intention action in GoLand

Preview for the Wrap error handling in a closure intention action

We’ve added a preview for the Wrap error handling in a closure intention action. You can disable the preview feature by pressing Ctrl+Q while the list of intention actions is open, and it will remain disabled until you use the same shortcut to turn it back on.

GoLand’s warning for a redundant condition in a for loop

Warning for redundant conditions in for loops

GoLand now shows a warning message for redundant conditions in for loops. There is also a quick-fix to remove the redundant condition.

AI Assistant

The AI Assistant plugin’s suggestions about how to improve the code

AI Assistant Limited access

With this release, we introduce a major addition to GoLand – AI Assistant. With the current starting set of AI-powered features, AI Assistant offers integrated AI chat and can automatically write documentation comments for you, suggest names, generate commit messages, and more.

AI Assistant is powered by the JetBrains AI service, which can connect you to OpenAI for now and will include other language model providers in the future. To access the assistant’s AI features, you’ll need to install the JetBrains AI plugin and log into the JetBrains AI service using your JetBrains Account. The availability of the JetBrains AI service may vary initially. For more information on AI Assistant and instructions on how to access it, refer to this page.

Docker

A preview of the contents of a Docker image layer in the Services view

Preview of files inside Docker image layers

It is now easy to access and preview the contents of a Docker image layer in the Services tool window. Select the image from the list, select Show layers, and click Analyze image for more information. This opens a list of the files stored in the layer, from which you can easily open the selected file in the editor by right-clicking on the file and clicking Open File (or Download File for binaries).

Setting a Docker container to run as a Before Launch task

Set Docker container to run as a Before Launch task for run configurations

It is now possible to set a Docker run configuration to run before another configuration by designating it as a Before Launch task. The IDE will wait for the container that is currently running to become healthy, and then it will launch the next run configuration. To set up a queue, first create a required Docker run configuration and then add it to the container via Modify options | Add before launch task | Run configuration.

Kubernetes plugin

Kubernetes settings as displayed in GoLand

Support for multiple kubeconfig files within a single project

We have introduced a new feature that allows you to set up multiple kubeconfig files within a single project. This simplifies the experience of handling multiple clusters or working with environments on different clusters in the same project. To set the files up, go to File | Settings | Build, Execution, Deployment | Kubernetes.

Kubernetes deployment logs as displayed in GoLand

Ability to view deployment logs

You can now view logs for deployments in Kubernetes clusters in the Services tool window. Right-click on Deployment in the tree and then select Follow Log or Download Log from the context menu.

Performance

New tool for easily generating shared indexes

We’re introducing a new command line tool for quickly building and uploading shared indexes. It is designed to streamline teamwork and eliminate time wasted on locally indexing large projects. The new tool simplifies the process of generating shared indexes for your team, requiring just a few clicks instead of multiple scripts and services.
Learn more

Version control

Selecting lines for a commit

Option to commit specific lines of code

You can now selectively commit specific parts of code chunks. To perform a partial commit, select the desired lines within a chunk and call Include these lines into commit from the context menu. The chunk will be divided into individual lines with the selected ones highlighted. You can add or exclude lines from the selection using checkboxes or the context menu.

GitLab integration

The GitLab plugin functionality in GoLand

GoLand 2023.2 introduces integration with GitLab to streamline your development workflow. You can now work with the Merge Request functionality right from the IDE: review the list of requests, check the changes, leave comments, and navigate to relevant views.

Kafka plugin

The Kafka plugin functionality in GoLand

Kafka plugin

The new Kafka plugin lets you monitor your Kafka event streaming processes. You can connect to a Kafka cluster, produce and consume messages in different formats, manage topics and monitor consumer groups, and use Confluent Schema Registry and AWS Glue Schema Registry. You can find more details on this documentation page.

User experience

Selecting the bundled VS Code keymap in the GoLand settings

Bundled VS Code keymap

If you’re accustomed to the VS Code keymap, you can now choose it in the Customize section on the Welcome screen. You can also change your keymap in Settings | Keymap.

Sorting files by modification time

File sorting by modification time in the Project view

GoLand 2023.2 brings the long-awaited ability to arrange your files in the Project view based on their modification time. This new functionality automatically reorders the files whenever the changes in your project are saved. To enable this feature, open the kebab menu (three vertical dots) in the Project view and then select Tree Appearance | Sort by Modification Time.

The option to pin a run configuration in GoLand

Pinned run configurations in the Run widget

To make managing multiple run configurations easier, we’ve implemented the option to pin preferred configurations in the Run widget. To add a run configuration to the Pinned section, open the kebab menu (three vertical dots) next to its name and select Pin. If you have multiple pinned configurations, you can easily rearrange them by dragging and dropping within the list.

Adding the Update Project button to the main toolbar

Improved main toolbar customization

We’ve expanded the customization options for the new UI’s main toolbar. You can now use a dropdown menu to quickly choose actions that you want to add to the toolbar. To do so, right-click on any widget, select Add to Main Toolbar, and explore the available options.

Making the hamburger menu into a separate toolbar in GoLand on Windows

Reworked hamburger menu in the main toolbar on Windows and Linux

We’ve refined the behavior of the hamburger menu in the new UI that is located in the main toolbar for Windows and Linux. Once you click on the menu icon, the elements now appear horizontally over the toolbar. Also, there’s now an option to turn this menu into a separate toolbar, accessible via View | Appearance | Main menu as a Separate Toolbar.

Selecting the Open Directories with Single Click option in GoLand’s settings

Single-click navigation between project directories

In the Project view, there’s a new Open Directories with Single Click option that makes expanding and collapsing the project folders quicker and more responsive. The option is available from the drop-down menu once you click on the kebab (three vertical dots) menu.

The Search Everywhere popup returning a text search option

Text search in Search Everywhere

Search Everywhere (Double Shift) is primarily used for searching through files, methods, actions, and settings. With this update, it now includes text search capabilities similar to Find in Files. Now, text search results are displayed when there are few or no other search results available for a given query. The feature is enabled by default and can be managed in Settings | Advanced Settings.

Syntax highlighted in the inspection description

Syntax highlighting in inspection descriptions

In Settings | Editor | Inspections, code samples now include syntax highlighting, which makes it easier to understand what triggers an inspection and whether you want to have it active or inactive.

Suggested plugins in the Plugins section

Suggested plugins in Settings

To make it easier to configure the IDE for your specific projects and extend its functionality with plugins, we have updated the UI for the Settings | Plugins section. It now includes a set of suggested plugins that is automatically defined based on your project specifics and appears at the top of the list.

User interface

Open projects with headers of different colors in GoLand

Colored project headers in the new UI

GoLand 2023.2 introduces colored headers to simplify navigation between multiple open projects. You can now assign a unique color and icon to each of your projects, making them easier to distinguish in your workspace.

Headers now come with predefined colors by default, but you can customize them. To set a new color for your project, right-click on a header and access the context menu. Select the Change Project Color option and choose your desired color. To disable this feature, simply deselect the Show Project Gradient option in the context menu.

The Light with Light Header theme in GoLand

Light theme with light header in the new UI

For v2023.2, we’ve refined the user experience with the Light theme by introducing the Light with Light Header alternative, which features matching light colors for window headers, tooltips, and notification balloons.

GoLand’s Services tool window with the updated UI

Updated UI for the Run/Debug widget in the Services tool window

We’ve reworked the UI for the running and debugging actions in the Services tool window to make the look and feel of the toolbar consistent with that of the main Run/Debug widget.

GoLand without the native Linux header

Removed title bar on Linux in the new UI

For the convenience of Linux users, the native header of the operating system has been removed in the new UI, resulting in a cleaner interface. By default, you will now see the custom IDE’s header, which offers a range of customization options to tailor your workspace.

HTTP Client

Code completion in the HTTP Client for a Swagger schema

Support for Swagger and OpenAPI schemas

The HTTP Client is now capable of understanding Swagger and OpenAPI specifications and providing corresponding code completion options for JSON requests.

JavaScript code being imported in the HTTP Client

Support for JavaScript imports

You can now share common JavaScript code for HTTP Client request handlers via imported modules.

A preview of a PDF file in the HTTP Client

PDF and HTML previews for responses

GoLand can now display previews of PDF and HTML files right in the results of requests in the HTTP Client.

A gRPC request with TLS in the HTTP Client

gRPC requests using TLS in the HTTP Client

You can now send gRPC requests over Transport Layer Security (TLS) in the HTTP Client. TLS provides encryption and authentication, ensuring the confidentiality and integrity of your data transmission. Both https:// and grpcs:// schemas are supported in the request syntax.

Web development

GoLand’s improved formatting for TypeScript errors

Improved error formatting

In GoLand 2023.2, errors and warnings will now be formatted in a more readable way, making it easier to spot problems in your code. This works for all TypeScript errors and some of the most common JavaScript ones.

An inspection correcting the use of nested CSS code in GoLand

CSS nesting support

GoLand now supports the CSS Nesting Module feature. We’ve implemented syntax support and an inspection for ensuring that the nested selector does not start with an identifier or functional notation.

Other

A NO string highlighted by GoLand in a YAML document

Inspection for the Norway problem in YAML files

We’ve introduced a new inspection to eliminate the so-called Norway problem and prevent the unintended misinterpretation of Boolean values in YAML files.

When a list primarily consists of strings but contains a Boolean-like literal, GoLand will highlight this literal, indicating a potential inconsistency, and suggest adding quotes to it. If the list is mainly composed of Boolean-like literals (such as true, false, off, on, yes, no), any literal that deviates from this pattern is highlighted as a possible error. However, no specific quick-fixes are suggested in this scenario.

The reworked Edit Swagger Codegen Configuration dialog in GoLand

Improvements for Swagger Codegen

The IDE now provides a better user experience when setting up Swagger Codegen configurations. We’ve reworked the Edit Swagger Codegen Configuration dialog to make it easier for you to tailor the run configuration to your requirements.

Running a Swagger Codegen configuration in GoLand

Additionally, you can now access the Swagger Codegen run configuration right from the gutter without having to specify any additional settings.

A Redoc preview in GoLand

Redoc UI previews for OpenAPI and Swagger files

GoLand now supports Redoc UI previews for OpenAPI and Swagger specification files, including YAML and JSON files, allowing you to switch between the Redoc and Swagger UIs within the IDE. With the Redocly integration, you can access the Try it console right from within GoLand and use it to set parameters and send requests to your API.

The Editor Preview pane along with endpoints for an AsyncAPI schema

Support for editing AsyncAPI files

You can now work more conveniently with the AsyncAPI specification format in GoLand. The IDE supports schema validation functionality and provides code completion for references, the Endpoints view, and the Editor Preview pane.

LSP API for plugin developers

With this release, we’ve introduced an LSP API for plugin developers who want to use a specific LSP server for coding assistance in the IDE. If you’ve made your own programming language or framework, you can get it supported in the IDE by creating an LSP server and a plugin.