Drag and drop tabs anywhere to split the editor
What's New in GoLand
In GoLand 2020.3 you can explore the goroutines dump, run and navigate to individual table tests, and get more from the expanded
support for the Testify test framework. You will also find many new code editing features,
including support for time package, smarter ways to handle packages, UI improvements, a variety
of new features for web development and working with databases, and a new service for collaborative development and pair programming.
Prefer to learn interactively instead of reading? Complete the
What's New in GoLand 2020.3 tutorial inside the IDE on the Welcome screen.
Debugger improvements
The new Dump Goroutines icon in the debugger lets you easily find goroutines that contain a specified string in the stack during the debug session. Simply click the icon to open a dump in a separate window. To help you keep focus on information that matters, there is the option to hide an individual goroutine or goroutines with the same stack. Right-click on a goroutine and select the desired action or just press delete to move it to a special Hidden section in the dump window where it won’t distract you. GoLand 2020.3 brings the ability to stop a process with Go Remote configuration if no reattach is required. In your configuration settings you can specify the default behavior of the debugger on disconnect, you can choose Stop remote Delve processes, Leave it running, or have GoLand ask you how to proceed each time. Testing enhancements Support for table tests You can run and navigate to individual table tests from the Run tool window. There are some limitations: The test data variable must be a slice, an array, or a map. It must be defined in the same function as the call and must not be touched after initialization (except for range clauses in a for loop). The individual test data entry must be a struct literal. Loop variables used in a subtest name expression must not be touched before the call. A subtest name expression can be a string field in the test data, a concatenation of test data string fields, and an call with and verbs. Expanded support for Testify The IDE now recognizes the test function that starts a test suite, and provides a way to start an individual and , as long as the subtest name is a string constant. In addition, it is possible to rerun a subtest from the Run tool window to avoid rerunning the entire top-level test. In addition, GoLand can now run Testify suites with the same method name separately within a single test case. Last but not least, when you complete a function or method that accepts as the first argument, GoLand passes that argument automatically if possible. This works for functions and methods of , , , and packages. Code inspections The Incorrect usage of Println/Printf like functions code inspection will warn you about potential problems in , , and packages. On top of that, we’ve added placeholder highlighting and folding, as well as the Add format string argument intention. The context.CancelFunc not called code inspection reports potentially unsafe uses of context cancellation. This is especially useful when the ‘cancel’ function returned by (and similar functions) isn’t called on all execution paths. To learn more about this package, please visit: https://golang.org/pkg/context/. Code editing Support for time package We’ve added support for the time package so you can work with time and duration more easily. GoLand will suggest elements of predefined layout via code completion(Ctrl+Space) as , , placeholders from ISO-8601. Press Ctrl+P on a token, and the IDE will show its meaning. There is also syntax highlighting for layout tokens. Code completion also suggests standard time layouts outside of the string literal. Smarter package handling The IDE is now smarter at prioritizing completion items for packages that you use frequently and that are explicitly declared in the file of your project. We’ve also added an option to exclude packages completely from your project import path and completion suggestions. You can do this via Alt+Enter or in the new Exclude for import and completion window in Settings | Go | Imports. Support for variable shadowing GoLand makes it easier to spot variable shadowing: The IDE shows variables that shadow any existing declaration in a different colour now. Navigate to shadowing declaration intention action lets you immediately switch to the shadowed declaration. Square Brackets in Type Parameters We’ve followed updates from the design of generics by the Go team and added support for square brackets for the generics syntax instead of parentheses, as this was implemented in the previous proposal edition. Please note that the Enable generics (experimental support for type parameters) setting in Settings | Go is turned off by default. You need to explicitly select that checkbox to start using the feature. Read this blog post to learn more about type parameters. Other improvements When you type in the test file, GoLand by default suggests and Live Templates in the completion options. When you type inside the benchmark, the IDE suggests completing it with a for loop with . Improved spelling and grammar checkers Suggestions now appear immediately in the dialog when you press Alt+Enter. In addition, a new version of the LanguageTool grammar checking engine features improved checks for English and adds support for 10 additional languages. Code With Me GoLand 2020.3 supports Code With Me (EAP) – a new service from JetBrains for collaborative development and pair programming. Code With Me enables you to share the project you currently have open in your IDE with others and work on it together in real time. Check out these posts to learn more about it. UI improvements Reworked Welcome screen We’ve reworked the Welcome screen to give you immediate access to: Search for projects. Settings to customize your IDE. Plugins to expand the functionality of your IDE. Tutorials to learn more about your IDE’s features. Sync IDE theme with your OS preference Select the Sync with OS option in Settings | Appearance & Behavior | Appearance | Theme to automatically switch your IDE theme to match your OS preferences. Drag and drop tabs anywhere to split the editor Split the main editor screen horizontally or vertically by dragging a tab to the desired position and dropping it there. When you are dragging a tab, the editor will highlight where you can drop it. Project view updates We’ve improved the UX when working with files from the Project view. Now, when you open a file from the Project view, the focus is automatically placed on the editor to allow you to start working with your code right away. Press the spacebar and the IDE will show you a preview of the file in the Project view. If you want to have several files open in the editor simultaneously, you can now do so with one simple shortcut. Select the file in the Project view and press Shift+Enter to have the IDE split the Editor window and open the file in the right-hand part of it. VCS updates Reworked VCS menu The VCS menu now adapts to version control system that you are currently using, making it easier to access key VCS features as they are no longer hidden in a submenu. Support for Git staging area There is an awesome new Git staging area available! Please note that this functionality is only available for the Commit tool window. Tick the Enable staging area checkbox in Settings | Version Control | Git to turn it on. Once you do, support for changelists will be disabled. In the commit UI, you will find staged and unstaged files. When you’re ready to stage a file, simply click the + icon next to it. The file will appear under the Staged node. To add your changes to the staging area, you can also use the gutter icon or Show Diff. Improved work with branches Work with branches has been improved: The IDE now automatically corrects unaccepted symbols in the names of new branches, which helps you create branches in line with the accepted format. The IDE will now show you all the actions available for the currently selected branch, just like it would for other branches. For remote branches, we’ve renamed the Merge into Current and Rebase Current onto Selected actions to Pull into Current Using Merge and Pull into Current Using Rebase. More features Plugins enabled per project We’ve added the ability to enable plugins for the current project or for all projects by selecting Enable for Current Project or Enable for All Projects. In Settings | Plugins, press the gear icon on the plugin you want to enable or disable and select the desired option. System shortcut keymap for macOS macOS system shortcut keymap (Settings | Keymap) aims to provide you with an alternative macOS keymap that offers extended compatibility with system shortcuts and allows you to avoid using F-keys for essential actions. Profiler – Flame Graph We’ve improved the search mechanism of the Flame Graph in the Profiler and its visualization to let you find method metrics faster. You can click on the magnifying glass icon or type your search request inside the Flame Graph panel. Also, we’ve added a search field, up/down arrows for fast navigation between search results, and the ability to search either in the whole Flame Graph or just in a specific subtree. Web development changes Create a React component from its usage Courtesy of the WebStorm team, GoLand now has rich support for web development under the hood. One of the upcoming changes in this area is the ability to create a React component from an unresolved reference. Place the caret at an unresolved component, press Alt+Enter, and select the corresponding inspection. Full support for pnpm GoLand provides full support for the pnpm package manager, along with npm and yarn. When you open a project with a pnpm-lock file and have pnpm installed on your machine, GoLand will automatically change the package manager for this project to pnpm. The IDE also has a dedicated pnpm option in the list of package managers under Settings | Languages and Frameworks | Node.js and NPM. Basic support for multiple webpack configs GoLand 2020.3 will let you choose between detecting webpack configuration files manually or automatically. The new options can be found in Settings | Languages & Frameworks | JavaScript | Webpack. Work with databases Couchbase support Thanks to our colleagues from the DataGrip team, GoLand has expanded its family of supported databases with a new member – Couchbase! Please note that the IDE supports the Couchbase Query service, not the Couchbase Analytics service. Support for grants GoLand knows about object grants and displays them in an object’s DDLs. This works for MySQL, PostgreSQL, Greenplum, Redshift, and SQL Server. Separate editor for cell values We’ve improved the separate editor for cell values: It now displays the formatted value even if the value is not formatted properly. It’s possible to edit the value in the formatted view and update it with the original formatting in one-line XMLs and JSONs. If the width of the screen is crucial to your flow, you can move the cell value editor to the bottom of the data editor. This panel can now also display images! Import/export for databases We’ve added two new extractors to help make it easier for you to work with data: One-Row will help you copy a column to a comma-separated string. SQL-Insert-Multirow will generate a single statement with multiple new rows to be inserted. In addition, there is now a new option in CSV format configuration: never quote values.