GoLand 2022.3 offers performance enhancements and new features for generics and Go workspaces. The new version integrates the Go Playground, adds support for improved Go documentation comments, introduces new features for the HTTP client and Docker, and provides a new UI.

In addition, GoLand has also ushered in its 5th birthday, and the official invites all developers to celebrate together. Now type “Happy B-day, GoLand!” into GoLand 2022.3 or GoLand 2022.2.5 and see what Easter eggs come up.

performance improvement

https://www.jetbrains.com/go/whatsnew/img/2022.3/go-list-performance.png

to help improve indexing go list Change

When you open a project, GoLand indexes the files and runs [go list](<https://go.dev/ref/mod#go-list-m>) command, which reports information about the project structure.Indexing will take place at go list The runtime is paused and you cannot access Code Insight until indexing is complete.

Previously, GoLand would run twice in some cases go list.We changed the API to reduce go list The number of starts. We hope this change will significantly improve the performance of large projects with many modules.

Restore project structure from cache on open

Now, when opening the project,go list Reported information will be saved to disk cache. When the project is opened again, the project structure-related data is loaded from memory and taken into account when indexing starts.

As a result, indexing can continue uninterrupted, complete faster, and code insight features become available sooner after opening a project.

Faster IDE startup and project opening

GoLand also received a number of other performance improvements aimed at reducing the time it takes to start applications and open projects in JetBrains IDE.

Overall startup performance (including editor restore) is thus improved by about 30%.

generic

https://www.jetbrains.com/go/whatsnew/img/2022.3/generate-tests-generic-func.png

Test Generation for Generic Functions

You can now generate tests for functions with generic parameters.

https://www.jetbrains.com/go/whatsnew/img/2022.3/quick-fix-cap-type-params.png

Quick-fix for uppercase type parameters

There is now a check to detect lowercase type parameters, and a quick-fix to make them uppercase.

Go workspace

https://www.jetbrains.com/go/whatsnew/img/2022.3/go-workspace-file-action.png

Go Workspace File operations

In the New context menu you will now find the Go Workspace File action.When selected, a go.work document.Existing Go modules will be automatically added to go.work in the file.

https://www.jetbrains.com/go/whatsnew/img/2022.3/gowork-replace.png

use replace command generation go.work

If there is replace command, you can now start from the go.mod generate go.work.Place the text cursor on replace On the command, press ⌥⏎ to see all available intent actions, then select the Add … module to workspace… quick fix.

Go Documentation Comments

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

https://www.jetbrains.com/go/whatsnew/img/2022.3/links-go-docs.png

support for links

We added references to documentation links in GoLand. Clicking on them takes you to the referenced element, and clicking on a text link takes you to the text link definition.

Text and documentation links are rendered as links in both the Quick Documentation popup and the Documentation tool window.

https://www.jetbrains.com/go/whatsnew/img/2022.3/headings-go-doc.png

Support for new titles

Starting with Go 1.19, titles start with a number notation (#) followed by a space and a line of header text.

The new title is rendered as an HTML title in GoLand’s Quick Documentation popup and Documentation tool window.

https://www.jetbrains.com/go/whatsnew/img/2022.3/lists-go-doc.png

Support for lists

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

Integrated Go Playground

https://www.jetbrains.com/go/whatsnew/img/2022.3/go-play.png

We have integrated Go Playground functionality in GoLand.

You can select a piece of code, select the Open In option, and click Playground. This will open the scratch file with a toolbar with the same options as the 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 fix

https://www.jetbrains.com/go/whatsnew/img/2022.3/quick-fix-invalid-recursive.png

Quick fix for invalid recursive types

If the type contains itself, you will get an “Invalid recursive type” error. To avoid this, you should include a pointer to the type, not the type itself. We now provide a quick fix.

editor

https://www.jetbrains.com/go/whatsnew/img/2022.3/code-vision-author.png

Code Vision

We have already started implementing Code Vision functionality. Currently, code authors are displayed when version control integration is enabled. Clicking on the code author name will open the Annotate with Git blame sidebar, showing who introduced the change.

https://www.jetbrains.com/go/whatsnew/img/2022.3/usages.png

We’ve also introduced usages shown near all functions and types, showing how many times a function or type has been referenced in the current project.

https://www.jetbrains.com/go/whatsnew/img/2022.3/inlay-hints-iota.png

Inline hints for constant definitions

GoLand now shows inline tooltips for constant definition blocks.this is in iota derived constant blocks, where a hint shows the iota value.

https://www.jetbrains.com/go/whatsnew/img/2022.3/fill-struct-ignores-auto-proto.png

Fill all fields (fill all fields) ignore the automatically generated protobuf fields

When calling the Fill all fields intent action, the IDE ignores XXX_ Auto-generated protocol buffer fields beginning with . These fields are only displayed after the second call to completion.

Other Go-related features

https://www.jetbrains.com/go/whatsnew/img/2022.3/env-vars.png

Go environment variables show up in settings

GoLand now automatically fetches Go module related system variables and displays them in the Environment variables dialog window. To open this window, go to Preferences | Go | Go Modules, click the Edit environment variables icon.

https://www.jetbrains.com/go/whatsnew/img/2022.3/show-package.png

Package names are always shown in Quick documentation

The IDE now always displays the package name in the Quick documentation popup for top-level declarations.Previously, it was only possible to find doc.go or <pkg_name>.go The package header will only be displayed if the file is displayed.

Increase maximum file size

We’ve increased the file size limit from 2.5 MB to 10 MB. Code insight features such as navigation and highlighting are not available for files that exceed the maximum size.

While the 2.5 MB limit is sufficient for most files, some projects, such as the AWS SDK or GCP, have larger files.

Receiver names are different (receiver names are different) check ignore generated code

Since the Receiver names are different check is not relevant to generated code, we have disabled it for files containing comments matching the following regular expression:^// Code generated .* DO NOT EDIT\\.$

HTTP client

https://www.jetbrains.com/go/whatsnew/img/2022.3/http-prereq-script.png

Pre-request scripts and new APIs for JavaScript handlers

The HTTP client now supports executing script blocks before the request. You can generate the data before executing the request and use variables to put it in the final request. A quick fix can be used to create boilerplate code for initializing variables.

https://www.jetbrains.com/go/whatsnew/img/2022.3/http-crypto-hash.png

The HTTP client now supports the Crypto API. You can compute md5 or sha1 hashes of HTTP requests.

https://www.jetbrains.com/go/whatsnew/img/2022.3/http-random-var.png

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

Docker

https://www.jetbrains.com/go/whatsnew/img/2022.3/docker-wsl.png

Use Docker executables from WSL without installing Docker Desktop

GoLand now supports connecting to Docker running in Windows Subsystem for Linux (WSL). You can set up the connection in Preferences | Build, Execution, Deployment | Docker (Settings | Build, Execution, Deployment | Docker).

https://www.jetbrains.com/go/whatsnew/img/2022.3/docker-pull-image.png

New intent action: Pull Docker image (Pull Docker image)

Now, there is a way to Dockerfile or docker-compose.yml A simple way to run and pull images. To do this, invoke the contextual action (⌥⏎) on the highlighted image name and select Pull Docker image.

https://www.jetbrains.com/go/whatsnew/img/2022.3/dockerignore.png

.dockerignore file type support

We introduced the pair .dockerignore Full support for documentation, including code highlighting and completion. These files are taken into account when building images from the IDE.

https://www.jetbrains.com/go/whatsnew/img/2022.3/docker-heredoc.png

Support heredoc format in Dockerfile

The Here documentation allows the subsequent Dockerfile line redirects to RUN or COPY The input of the command. GoLand now supports this syntax, which you can use in Dockerfile Generate configuration files or multi-line scripts in the file.

https://www.jetbrains.com/go/whatsnew/img/2022.3/docker-contexts.png

Docker connection from Docker context

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

Remote Development (Beta)

https://www.jetbrains.com/go/whatsnew/img/2022.3/remote-dev-wsl.png

The IDE backend can now be launched directly in WSL 2, and you can connect to it just like you would to a remote machine when using remote development in GoLand.

User Interface

https://www.jetbrains.com/go/whatsnew/img/2022.3/new-ui.png

new UI

As you know, in May of this year we announced a closed preview program for the new UI in the JetBrains IDE.

We invite you to switch to the new UI in Preferences | Appearance & Behavior | New UI Preview (Settings | Appearance & Behavior | New UI Preview).

https://www.jetbrains.com/go/whatsnew/img/2022.3/intention-preview.png

Intent action preview enabled by default

The preview feature for intent actions is now turned on by default, allowing you to immediately see how your code will change when you apply the IDE’s suggestions.

When the list of intent actions is open, you can enable or disable the preview feature by pressing F1.

https://www.jetbrains.com/go/whatsnew/img/2022.3/dook-to-floating.png

Dock tool windows to floating editor tabs

To make it easier for you to arrange your workspace 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.

https://www.jetbrains.com/go/whatsnew/img/2022.3/tipoftheday.png

Improved Tips of the Day

We’ve enhanced Tips of the Day, a learning tool to help you explore GoLand.

Each prompt now has a title. We’ve also fine-tuned the algorithm that determines which hints to display, so you can see the ones that are most relevant to your IDE experience and the project you’re working on.

https://www.jetbrains.com/go/whatsnew/img/2022.3/add-bookmark.png

Updated Bookmarks (bookmarks)

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

https://www.jetbrains.com/go/whatsnew/img/2022.3/bookmark-create-list.png

You can add all files in all currently open tabs to Bookmarks. To do this, call the same context menu and select Bookmark Open Tabs (bookmark open tabs), or use the three-dot icon on the right side of the editor tab pane.

https://www.jetbrains.com/go/whatsnew/img/2022.3/settings-sync.png

New Settings Sync solution

We introduced a reworked solution for syncing custom user settings. For a long time, there have been two parallel plug-ins with cross-functionality: IDE Settings Sync (IDE settings synchronization) and Settings Repository (settings repository). To avoid the confusion of having two similarly bundled plugins, we’ve combined their feature sets into one solution, the new Settings Sync plugin.

database

https://www.jetbrains.com/go/whatsnew/img/2022.3/redis.png

Redis support

The long-awaited initial iteration of Redis support is now implemented.

https://www.jetbrains.com/go/whatsnew/img/2022.3/quick-filter-db.png

quick filter

You can now also filter objects when using Quick Search. All non-matching objects will be hidden.

web development

https://www.jetbrains.com/go/whatsnew/img/2022.3/code-vision-js.png

Code Vision for JavaScript and TypeScript

This release introduces new Code Vision features for web development. It can collect various metrics on types and type members in JavaScript and TypeScript code, and display this information near declarations.

other updates

https://www.jetbrains.com/go/whatsnew/img/2022.3/yaml-suppress-uknown-key.png

Quick fix for suppressing checks in YAML

In YAML files (including Kubernetes files, OpenAPI specifications, and docker-compose.yml file), a new quick-fix can be disabled by commenting.

An option has also been introduced to collapse blocks consisting of 3 or more lines and start with # A multi-line comment at the beginning.

Installer for Windows ARM64

GoLand has started distributing installers for Windows ARM64, which developers can download from the official website or via the Toolbox App.

More details can be viewed at: https://blog.jetbrains.com/go/2022/12/01/goland-turns-5/

#GoLand #celebrates #anniversary #released #March #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *