GoLand 2022.1 Goes Beta
GoLand 2022.1 has now reached Beta. We’ve stopped adding new features and are concentrating on fixing bugs and getting GoLand ready for the major release in the middle of April. This is the last build in our EAP cycle that doesn’t require a license.
You can get the Beta 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.
Generics
Improvements and bug-fixes
Go 1.18 has been released, and generics are now officially part of the language. Over the span of several weeks, we’ve fixed 160+ generics-related issues (some of those changes have been backported to v2021.3). If you have been experiencing any problems, download this build and you will see a difference.
Fixing false positive and false negative errors has been our priority. We’ve added a couple of generics-related features, as well.
Completion
As soon as you type an opening bracket, GoLand inserts a closing bracket.
GoLand shows type parameters in the completion suggestions and inserts the brackets when you accept one of the suggestions.
The Implement missing methods quick-fix
If a type argument doesn’t have all of the methods from the interface it is constrained by, GoLand will show an error. You can implement missing methods by using a quick-fix right from the error message.
Alternatively, click on the red light bulb or press ⌥ ↩ (Alt+Enter for Windows/Linux) and choose Implement missing methods.
Go workspaces
We’ve added basic support for another feature from Go 1.18 – workspaces. According to the Go team, in their 2021 user survey, the most common challenge users identified with modules was working across multiple ones. The Go authors say the new Go workspace mode will make it simple to work with multiple modules.
In GoLand 2022.1 Beta you can open a directory with the go.work file and continue developing as usual. Syntax highlighting and code completion in go.work will come later.
Microservices
In the upcoming release, you will find some new features that will make working with microservices easier. Keep in mind that the new features only work with standard library functions for now. We will consider adding support for some popular frameworks later.
Find usages and navigate
You will see in your Go files that there is now a globe icon next to each endpoint. Click on the icon and GoLand will suggest several options.
For instance, you can now find all of the usages of an endpoint and navigate to them. You can also see usages by pressing ⌘/Ctrl and clicking on an endpoint.
Generate a request
The second option when clicking the globe icon is Generate request in HTTP client. Choose a corresponding option, and the IDE will open a bundled HTTP client.
Our HTTP client has also received some updates – you now get code completion for endpoints. Completion works for the endpoints from Go files (only standard library for now), Swagger specifications, .proto files, and JavaScript files.
The Generate request in HTTP client action can be used to generate a request for every valid URL.
Endpoints tool window
The third option is Show all endpoints of module. If you choose this option, GoLand will open the new Endpoints tool window where you can see all the endpoints for your project.
You can Jump to source from here or you can click on every endpoint and run requests right from the HTTP client tab.
Completion for methods and headers
You now get completion for HTTP methods and headers in Go files.
Links and endpoints are underlined
All links and endpoints in Go files are now underlined so you can easily see them in the code. The links are clickable and can be opened in a browser.
Better support for .proto files
We’ve introduced a new intention action for .proto files that adds missing import statements for unresolved message references.
After adding the missing import statements, the IDE will provide completion suggestions for message references.
gRPC reflection support
If your project doesn’t have a .proto file but the server supports gRPC reflection, you will be able to run requests and get completion for service and method names right from a running server instance.
Editor
String formatting support for testify functions
GoLand now reports errors if you use wrong formatting verbs in testify/assert functions.
Debugger
Hidden tab labels
To maximize the usable space in the Debug tool window, we’ve hidden the tab labels by default. To make them visible again or to customize their location, use the Show Tab Labels option in the Layout Settings.
Kubernetes
Remember that the Kubernetes plugin is not bundled, you have to install it in Preferences/Settings | Plugins.
Edit resources on a cluster
Modifying resources loaded from a cluster can now be done from the editor tab.
Custom path to kubectl
You can now manually configure a path to kubectl if it is not in the standard location. To set your custom path, go to Settings / Preferences | Build, Execution, Deployment | Kubernetes | Path to kubectl executable.
Port forwarding
We’ve added port forwarding functionality for pods. To forward ports, you can either use the icon on the toolbar or choose the context menu item.
Describe Resource action in the Services view
A new Describe Resource action is present for all resources in the Services view. You can call it from the context menu or use the toolbar button.
Support events in a cluster
Cluster events are now displayed in a separate node in the Services view, providing data about recent events in the system.
Werf support
We’ve introduced limited editor support for werf.yaml and related Helm template files, including code completion functionality, inspections and quick-fix suggestions, refactoring and renaming for .Values.werf.image.*, and validation for some fields like boolean and int.
Docker
New Services view UI
We’ve significantly reworked Docker’s UI in the Services tool window. The makeover has been implemented for containers, images, networks, and volumes.
Support for Docker Compose targets
We’ve added support for Docker Compose targets. To add a target, go to Run | Manage targets | Add new target.
Docker Registry V2 support
GoLand now offers support for Docker Registry HTTP API V2. You can create simple or password-protected Docker V2 registries and perform all of the usual actions, like viewing, pushing, and pulling images.
Markdown
The Copy code icon
We’ve added a Copy code icon to Markdown blocks to help you easily copy contents to the clipboard.
Run commands
If a Markdown file contains instructions with commands that you need to execute in your terminal, you can run those commands directly from the Markdown file using the Run icon in the gutter.
Improved floating toolbar
To make it easier to format Markdown files, we’ve reworked the floating toolbar that appears on text selection. Besides the new design, the toolbar now offers list creation functionality and a dropdown menu that allows you to select header styles.
User experience
The new Notifications tool window
We’ve replaced the Event Log instanсe with a new Notifications tool window to highlight important and helpful notifications from the IDE.
Updated Structural Search and Replace dialog
The Structural Search and Replace dialog has been redesigned to feature a list of all the templates, to make it easier to navigate between them.
For Structural Search and Replace, GoLand supports XML, HTML, SQL, and JavaScript.
Evenly split tabs
You can now evenly distribute the working space among editor tabs. To set this up, go to Settings / Preferences | Advanced Settings | Editor Tabs | Equalize proportions in nested splits.
Version control
Updated Commit details pane in the Git tool window
The Commit details pane now includes detailed GPG signature information.
Improved Annotate with Git Blame
We’ve improved the functionality of Annotate with Git Blame to make investigating changes easier. The IDE highlights the differences in lines right in the editor when you hover over an annotation, and it opens the Git Log tool window when you click on one.
Database improvements
Copy multiple objects
You can now select multiple tables and copy them to another schema.
Select the tables and press F5 to open the export dialog. As with exporting a single table, you can map the columns, see the DDL of the new table, and change it.
MongoDB: Editing fields in results
You can now edit the results in MongoDB collections just as you do in relational databases.
Web development
Improvements for Vue
We have several improvements for Vue 3. If you define components as global, the IDE will now recognize them in your .vue files. GoLand should also support the createApp syntax. It will correctly match applications created using createApp with their related elements. This version also includes support for Nuxt 3, a new version of a popular Vue framework.
Next.js updates
We’ve fixed the support for pages. GoLand resolves paths used in the href property of your Link components. Code completion, navigation, and refactorings like Rename work too.
ESM support for webpack configuration
From now on, webpack coding assistance will work with ES modules in your webpack.config.js files.
Integration with Volta
GoLand now has integration with Volta, a JavaScript tool manager. It will automatically recognize Yarn and npm installed using Volta.
Accessibility improvements
To facilitate navigation in the Log tab, the screen reader now reads the names and descriptions of the branches’ trees. It provides a voice prompt to use ⌘ L (Ctrl + G) to navigate through other Log filters.
The accessibility support for macOS users has also been improved. We’ve resolved the VoiceOver issue that was causing multiple unnecessary repetitions of list elements. Additionally, VoiceOver can now read combo box lists, and we’ve fixed the incorrect positioning of its cursor when working on an external display.
***
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.