Checkout and Rebase onto Current for remote branches

What's New in GoLand

GoLand 2021.3 has native support for Go projects in WSL,

the Inline Function refactoring,

and support for remote development in Beta mode.

Starting from this version, on save is enabled by default.

GoLand 2021.3 has some improvements for the debugger,

such as Delve for ARM64, the

Show Types option, and more.

There are two new postfixes for converting strings to numbers,

a new template for table tests with assertions and better completion for values in struct tags.

As usual, the new GoLand version brings web development enhancements

and a variety of new features for working with databases.

If you prefer an interactive approach to learning,

complete the What's New in GoLand 2021.3 tutorial from the Welcome screen.

WSL support

Creating a project in WSL and choosing an SDK in WSL   We’ve added the ability to open a project in WSL and specify an SDK located there.   If you create a new project (or open an existing one) in WSL, GoLand will tell you that for this project you have to use a Go SDK in WSL. You can download a Go SDK or choose an existing one in the subdirectory.   Formatter   Code is formatted when the file saved   on save   The Reformat code option, which lets you run and GoLand’s own formatter on save, is now enabled by default. The popup window shows a notification about code formatting on save   This change might take some users by surprise, so we’ve added a notification that will be displayed once in every project. You can turn it off by clicking Don’t show again.   You can click Edit actions on save, and the IDE will open Settings | Tools | Actions on save where you can manage the settings.   Refactorings      Inline Function and Inline Method   The Inline refactoring for functions and methods is now available. To try it out, place the caret on a function, method, or invocation and then press Ctrl + Alt + N.   When you invoke the Inline refactoring, a popup window opens with several options. From this popup, you can also open the Refactoring Preview, which helps you find all of the invocations of a method or function.   Completion   Code completion suggests different options for values in struct tags   Better handling of value styles in struct tags   We’ve improved the way different types of compound words – camelCase, snake_case, etc. – are handled when you add tags in struct fields.   When you fill out a tag, GoLand suggests a list of several options. After you’ve chosen one, the IDE remembers your choice and it will suggest the same style first in the list for other fields in this struct.   Postfix completion   Using postfixes to convert strings to numbers   New postfixes for string-to-number conversion   We have a couple of new postfixes for converting strings to numbers. Just type a number inside double quotes, then type a dot, and GoLand will suggest two options for parsing the number: and .   Show usages   Viewing the source file when using the Show Usages option   Source preview   The Show Usages feature has been improved – you can now turn on the source code preview for a found usage by clicking the square icon.   Run targets   Configuring folders on a remote target   Configure folders for sources and executables   You can now give meaningful names to the folders on the remote machine where the sources and executables for your project are stored. To configure the folders, go to Run | Manage targets | Additional Settings. Project-wide default run target settings   Project-wide default run target   It is now possible to set a project-wide default run target. Go to Run | Manage targets. A window will open containing the Project default target option. If you choose a particular target for the project, all new configurations will be created with this target. Proxy settings in the SSH configuration window   Proxy support for SSH connections   We’ve added the new HTTP/SOCKS Proxy section to SSH Configurations for you to specify a proxy server. You can find this section in Settings | Tools | SSH Configurations. Alternatively, from the opened project go to Run | Manage Targets | ...   Debugger   A new representation of nil interfaces in the debugger   Better representation of interfaces   Interfaces in Go have two components, a type and a value of that type. For an interface to be , both of these components must be .   If you have an interface with a value containing a pointer to an , that interface will not be equal to , because the inner type is not (it’s ). This can be confusing.   To detect such cases, we changed how interfaces are represented in the Variables tab of the Debug tool window. For instance, if you have an interface with inner type , and value , it will be shown like this: . The difference between how packages names are represented in 2021.2 and 2021.3   Short package names in the Variables tab   GoLand no longer displays the full package name in the debugger’s Variables tab. You will now see only the last part of the full name. Demonstrating how Show Types works   Hide/show object types   If object types take up too much space in the Variables tab, you can right-click in the tab area and deactivate the Show Types option in the menu that appears. You can turn it back on by selecting it again in the same menu. Delve executable built for the ARM64 is now available in GoLand   Delve for Linux ARM64   Starting from this version, GoLand bundles Delve built for the ARM64 architecture and debugging on Linux ARM now works out of the box.   We’ve also improved error messaging when GoLand doesn’t bundle Delve for specific architectures. The IDE now explicitly tells you what’s wrong.   Testing   Generating code with testify assertions   A template for assertions   We’ve added a new template for table tests with assertions. If you have already used in your package, GoLand will generate some code with assertions when you press Alt + Ins and choose the necessary option.   New quick-fixes   Using a quick-fix to format a string correctly   Quick-fix for error string formatting   GoLand now has a quick-fix for an inspection that warns you about incorrect formatting of error strings: “Error strings should not be capitalized or end with punctuation”. Press Alt + Enter, and GoLand will suggest fixing the string format. Using a quick-fix to export type   Export type quick-fix   If you have written an exported function that returns an unexported type, GoLand will suggest a quick-fix to export that type.   Other Go-related changes   A popup window shows information about context.TODO()   inspection   We’ve added an inspection that highlights the usages of . You can enable it in Settings | Editor | Inspections. The inspection will serve as a reminder to change if it was unclear which should have been used at the time of writing. TODO comment is added when Implement Methods action is used   comment   We’ve added the comment for the templates generated when you use the Implement Methods action. These special comments are highlighted in the editor, indexed, and listed in the TODO tool window, allowing them to serve as reminders about unimplemented methods.   Remote development   Remote Development section on GoLand’s welcome screen   GoLand now supports a Beta version of remote development workflows.   You can set up remote development workflows right from GoLand’s Welcome screen. Alternatively, you can use JetBrains Gateway, our new application that serves as an entry point to all your remote backends.   Find instructions on how to get started with remote development on this page.   HTTP client   Adding a grpc request in an http file   Support for gRPC requests   GoLand’s HTTP client now supports gRPC requests and provides completion for them. Start your requests with the keyword, and the HTTP client will treat them as gRPC requests. Generating a gRPC request by clicking on a gutter icon in a proto file   You can automatically generate a gRPC request in the HTTP client by clicking on the gutter icons in your files. Executing a server-streaming remote procedure call   Currently, the HTTP client can execute unary and server-streaming RPCs. Like in ordinary HTTP requests, the request body and responses are plain JSON files.   There are several other HTTP client improvements which you can read about here.   VCS enhancements   Executing the Checkout and Rebase onto Current action   Checkout and Rebase onto Current for remote branches   The Checkout and Rebase onto Current action allows you to check out the selected branch and rebase it on top of a branch that is currently checked out. Now it’s available for remote branches. Executing Push All up to Here action   New Push All up to Here action   Sometimes, you may have several commits that are ready to ship while others are still works in progress. In such cases, you may want to push only the ones you are confident about.   You can now push commits up to the one you have selected in the Log tab of the Git tool window. To do so, pick the commit you want to stop at, right-click on it to call the context menu, and select the Push All up to Here action. Version control settings   Reorganized VCS settings   We’ve made the VCS settings more discoverable and structured. The Version Control node in Settings now lists all the available settings.   UI improvements   Evaluate expression bar in the Variables tab   Evaluate expression in the Variables tab   Evaluate expression functionality is now available in the Variables tab in the Debug tool window. Splitting tabs in the Run tool window   Split tabs in the Run tool window   You can now split the Run tool window by dragging and dropping the tabs to the highlighted area. To unsplit the window, right-click the top pane and select Unsplit from the context menu. Using the Bookmarks window   New Bookmarks window   We have a new Bookmarks tool window. From now on, all the files and folders that you mark as important with the F11 shortcut will be located in this window.   Profiler   Comparing two snapshots and visualizing the difference on the flame graph   Visualize differences in snapshots   You can visualize the difference between the two snapshots on a flame graph. Press Shift twice and type "Open Profiler Snapshots" in the search bar. Open a snapshot from the list, repeat the same actions, and open another.   Then click the Compare With Baseline button in a tab of one of the snapshots. From the menu, select the snapshot that you want to compare against. A separate Diff tab will open with the results of the comparison.   Terminal   Demonstrating 24-bit color support in the built-in terminal on Windows   ConPTY   GoLand’s terminal supports the new ConPTY API on Windows. We addressed several problems users were having with the old implementation, which was based on winpty, and enabled PTY on Windows by default.   With ConPTY, 24-bit colors are supported in the built-in terminal. Typing in GoLand’s terminal with Typeahead support while working on a remote machine   Typeahead   Previously, when you were typing characters in GoLand’s terminal while working on a remote machine, the IDE couldn’t display the characters as fast as it would on a local machine because of latency.   This is no longer an issue because we’ve introduced typeahead support. Our built-in terminal predicts text modifications and instantly displays them in light grey.   Web development   Downloading remote ES6 modules by using a quick-fix on the import path in ES6 files   Support for URLs in statements   You can download remote ES6 modules using a quick-fix on the import path in ES6 files. The module will be downloaded with all its dependencies. To try it out, place the caret on the import path, then press Alt + Enter and select Download module. Typing code in an html file and accepting completion suggestion   Improved code completion for HTML   We’ve improved the way code completion works in HTML. Whenever you type a tag name or an abbreviation in the editor or invoke code completion, GoLand will show you relevant suggestions right away.   Previously, it would only show them if you typed the opening angle bracket () first. Code completion for character entity references has been improved as well. Updating npm packages with the Update ‘package name’ to the latest version quick-fix   New inspection for updating dependencies   You can update your npm packages to the latest version right from the editor. Open your file, place the caret on the package version you want to update, then press Alt + Enter and select Update … to the latest version. Putting elements in a JavaScript file on separate lines, and back on one line   Put elements on multiple lines   GoLand has been updated with an intention action for JavaScript projects that lets you quickly put comma-separated elements on separate lines, and, if needed, back on one line.   Database improvements   The Aggregate view for a range of cells in a database   Aggregate view for a range of cells   We’ve added the ability to display the Aggregate view for a range of cells. Select the cell range you want to see the view for, then right-click and select Show Aggregate View. One aggregate value is displayed in the status bar, and you can choose which value you’d like it to be. Splitting the editor tab   Independent editor tabs   If you split the editor and open the same table, the data editors will be completely independent. You can set different filtering and ordering options for them. The new inspection for boolean expressions in WHERE and HAVING clauses   Check for boolean expressions   We have a new inspection for boolean expressions in and clauses.   If the expression doesn’t seem to be explicitly boolean, we highlight it in yellow and warn you before you run such a query.   It works for ClickHouse, Couchbase, Db2, H2, Hive/Spark, MySQL/MariaDB, Redshift, SQLite, and Vertica. In all other databases, this will be highlighted as an error. Navigating from the selected cells to the related data   Foreign key navigation using several values   In the data editor, you can select several values and navigate to the corresponding data. A column type in a CSV file is detected and shown in a popup window   Automatic column types in CSV files   GoLand detects column types in CSV files, and now you can sort data by a numeric value. Before, data in columns was treated as text and sorting did not work as expected. Code completion suggestions are shown for a MongoDB filter operator   MongoDB: Completion for and   Code completion now works when filtering data in MongoDB collections. Different fonts are shown for the editor and the rest of the IDE   Custom font for the data editor   You can set fonts for the data editor separately from the rest of the IDE. To choose the font, go to Settings | Tools | Database | Data views | Use custom font.   Accessibility updates   We’ve addressed some accessibility issues to make working with the screen reader more comfortable. We’ve disabled the tool window widget pop-up and the quick documentation pop-up that used to appear on a mouseover.   Accessibility support on macOS has also been improved. We’ve resolved several issues with voiceover focus and made it possible to create projects using a screen reader. To minimize distractions while you're coding, we've reduced the number of help tooltips that play sounds.