GoLand Releases

Introducing GoLand 2020.2!

Read this post in other languages:

Today brings the release of GoLand 2020.2, and it’s already waiting to be installed on your machines. What’s inside? New features for Go modules, better presentation of possible problems and weak places in your code, new code inspections, new code editing features, such as the long-awaited Add Caret Per Selected Line, references and navigation support for comments to make code easier to read, as well as the ability to configure wrapping for call arguments, function parameters, and composite literal elements.

On top of that, we’ve added experimental support for generics (a.k.a. type parameters), the ability to share code to the Go Playground from the editor, updates for version control, including WSL 2 support for Git on Windows, and more!

Read more about the new features on the What’s New page, which includes a full overview of the release along with GIFs and screenshots.

Download GoLand 2020.2

If you prefer to learn about the release by trying it out instead of reading about it, you can complete the What’s new in GoLand 2020.2 tutorial inside the IDE on the Welcome screen.

What’s New Highlights

Go modules support

  • Support for the GOMODCACHE environment variable, which is coming soon with Go 1.15.
  • For replace, exclude, and require statements, the IDE provides a closing brace immediately when typing the opening brace.
  • Support for commenting in go.mod files.

Get everything from comments

  • GoLand 2020.2 shows references from doc comments to related package-level declarations and lets you navigate to them via the Navigate to Declaration or Usage action.

Code inspections

  • The Inspections widget displays the number of warnings, errors, and typos in the current file.
  • The Problems tool window shows a list of warnings and errors in the current file, gives you a description of the problems, and lets you fix them immediately via Alt+Enter and navigate to them in the editor via right-click.
  • The Malformed struct tag code inspection checks that struct tags conform to Go conventions.
  • A new code inspection handles possible problems with string(int) conversions and lets you fix them easily with quick-fixes.
  • Other new code inspections check for commonly mistaken usages of tests and examples, and provide quick-fixes to remedy them.

Code editing

  • We’ve added the option to configure wrapping for call arguments, function parameters, and composite literal elements in Preferences/Settings | Editor | Code Style | Go | Wrapping and Braces.
  • The Put arguments on separate lines and Put arguments on one line intention actions can be used to split or join call arguments, function parameters, and composite literal elements.
  • The new Add Caret Per Selected Line action creates carets on each selected line and deselects the lines so you can begin typing.
  • Intentions Preview lets you preview the result of intention actions and quick-fixes before you actually apply them.

Take control of variadic arguments

  • The Introduce Variable refactoring can pack some variadic arguments into a new slice variable, while Inline Variable, conversely, unpacks a slice into variadic arguments.
  • The Unpack slice quick-fix handles issues with unpacked variadic arguments.

Save projects as templates

You can now save projects as custom templates – select Tools | Save Project as Template.

Go Playground

Now you can share code to the Go Playground directly from the editor.

Generics, a.k.a. type parameters

GoLand 2020.2 provides experimental support for generics that you can play with by turning on the Enable generics (experimental support for type parameters) setting in Settings/Preferences | Go.

Under the hood

  • Faster resolve for projects with a vendor folder.
  • GoLand runs go list commands sequentially and provides a progress bar.

VCS

  • WSL 2 support for Git on Windows.
  • Improved Git action dialogs.
  • Full support for GitHub pull requests.
  • Compare branches with all the required information in one view.
  • Squash local commits from the log.

Database improvements

  • Added support for the Google BigQuery dialect.
  • New UI for boolean values.
  • Separate editor for long cell values.
  • DML preview in the data editor.

Web development

We’ve added new smart intentions (Alt+Enter) to help you perform some actions faster. For example, you can now quickly convert a for loop with a numeric index into a forEach array method.

As always, we look forward to receiving your feedback. So please write to us in the comments section below or our issue tracker, or tweet to us @GoLandIDE.

image description