GoLand 2021.3

Aggiunge il supporto nativo per i progetti Go nel refactoring WSL e Inline Function.
Dicembre 6, 2021
Nuova versione

Funzionalità

  • Microsoft Windows Subsystem for Linux (WSL) support
    • 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 \\wsl$ subdirectory.
  • Formatter
    • gofmt on save - The Reformat code option, which lets you run gofmt and GoLand’s own formatter on save, is now enabled by default. A notification has been added 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 - 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
    • Better handling of value styles in struct tags - 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
    • New postfixes for string-to-number conversion - 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: parseInt and parseFloat.
  • Show usages
    • 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
    • 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 - 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 support for SSH connections - 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
    • Better representation of nil interfaces - Interfaces in Go have two components, a type and a value of that type. For an interface to be nil, both of these components must be nil. If you have an interface with a value containing a nil pointer to an int, that interface will not be equal to nil, because the inner type is not nil (it’s *int). To detect such cases, how interfaces are represented has been changed in the Variables tab of the Debug tool window. For instance, if you have an interface with inner type *int, and value nil, it will be shown like this: {interface{} | *int} *int(nil).
    • 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.
    • 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 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. Error messaging when GoLand doesn’t bundle Delve for specific architectures has also been improved. The IDE now explicitly tells you what’s wrong.
  • Testing
    • A template for testify assertions - Added a new template for table tests with testify assertions. If you have already used assert in your package, GoLand will generate some code with assertions when you press Alt + Ins and choose the necessary option.
  • New quick-fixes
    • 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.
    • Export type quick-fix - If you have written an exported function that returns an unexported type, GoLand will now suggest a quick-fix to export that type.
  • Other Go-related changes
    • context.TODO() inspection - Added an inspection that highlights the usages of context.TODO(). You can enable it in Settings | Editor | Inspections. The inspection will serve as a reminder to change context.TODO() if it was unclear which Context should have been used at the time of writing.
    • //TODO implement me comment - Added the //TODO implement me 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 - 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, the new application that serves as an entry point to all your remote backends.
  • HTTP client
    • Support for gRPC requests - GoLand’s HTTP client now supports gRPC requests and provides completion for them. Start your requests with the GRPC keyword, and the HTTP client will treat them as gRPC requests. You can automatically generate a gRPC request in the HTTP client by clicking on the gutter icons in your .proto files. 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.
  • VCS enhancements
    • 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.
    • 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.
    • Reorganized VCS settings - The VCS settings have been made more discoverable and structured. The Version Control node in Settings now lists all the available settings.
  • UI improvements
    • Evaluate expression in the Variables tab - Evaluate expression functionality is now available in the Variables tab in the Debug 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.
    • New Bookmarks window - Added 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
    • 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
    • ConPTY - GoLand’s terminal supports the new ConPTY API on Microsoft Windows. 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.
    • 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 typeahead support has been added. The built-in terminal predicts text modifications and instantly displays them in light grey.
  • Web development
    • Support for URLs in import statements - You can download remote ECMAScript 6 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.
    • Improved code completion for HTML - 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.
    • New inspection for updating dependencies - You can update your npm packages to the latest version right from the editor. Open your package.json file, place the caret on the package version you want to update, then press Alt + Enter and select Update … to the latest version.
    • 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
    • Aggregate view for a range of cells - 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.
    • 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.
    • Check for boolean expressions - Added a new inspection for boolean expressions in WHERE and HAVING clauses. If the expression doesn’t seem to be explicitly boolean, GoLand highlights it in yellow and warns you before you run such a query. It works for ClickHouse, Couchbase, Db2, H2, Hive/Spark, MySQL/MariaDB, Amazon Redshift, SQLite, and Vertica. In all other databases, this will be highlighted as an error.
    • Foreign key navigation using several values - In the data editor, you can now select several values and navigate to the corresponding data.
    • 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.
    • MongoDB: Completion for filter {} and sort {} - Code completion now works when filtering data in MongoDB collections.
    • Custom font for the data editor - You can now 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
    • Addressed some accessibility issues to make working with the screen reader more comfortable.
    • Disabled the tool window widget pop-up and the quick documentation pop-up that used to appear on a mouseover.
    • Accessibility support on Apple macOS has also been improved.
    • Resolved several issues with voiceover focus and made it possible to create projects using a screen reader.
    • To minimize distractions while you're coding, the number of help tooltips that play sounds has been reduced.
WSL support

GoLand

Un IDE multipiattaforma creato appositamente per gli sviluppatori Go.

GoLand è disponibile anche in:

Hai una domanda?

Chatta live con i nostri specialisti di gestione delle licenze di JetBrains ora.