Releases

GoLand 2022.2 Is Here

GoLand’s second release of 2022 is now available! 

GoLand 2022.2 offers new features for generics and Go workspaces, as well as support for fuzz tests. SQL statements are now automatically detected, and you get comprehensive code assistance for them. In addition, GoLand now supports WebSocket connections and can send GraphQL queries over HTTP and WebSocket protocols. 

All of the new functionality available in DataGrip and WebStorm, our IDEs for working with databases and web development, respectively, is also available in GoLand. Check out the DataGrip 2022.2 What’s New and WebStorm 2022.2 What’s New web pages for more information.

To learn more about the new features in GoLand 2022.2, head over to our What’s New page, where you’ll find a full overview of the release along with GIFs and screenshots.

Download GoLand 2022.2

If you prefer an interactive approach to learning, you can complete the What’s New in GoLand 2022.2 tutorial from the IDE’s Welcome screen.

Here’s a brief overview of the new features.

Generics

We implemented some new inspections and other features for generics:

  • There is now an inspection that reports the usage of an empty interface as a type or type constraint. There is also an intention action that replaces interface{} with any.
  • Type parameters with empty parameter lists are now reported as errors, and we’ve added a quick-fix to delete them.
  • A new inspection reports unused type parameters.
  • The IDE now reports an error if you attempt to use interfaces with methods in unions.
  • If you try to use a type parameter as a constraint, GoLand will now display an error.
  • We’ve also introduced a new Find Usages group for generics, called Type parameter declaration.

Fuzz testing

You can now run fuzz tests from GoLand. If the test fails, the failing seed corpus entry will be written to a file and placed in your package directory in the testdata folder. You can open this file from a console and run the test with a failed entry. 

We’ve also added a quick-fix to change the Go SDK if the current Go SDK doesn’t support fuzzing.

Go workspaces 

We’ve added a quick-fix that groups multiple use directives in a go ​work file into one directive.

Go 1.19

  • We’ve added support for fmt.Appendf.
  • GoLand now supports the new unix build tag.
  • We’ve added the new Go architecture loong64 to our Arch list in Preferences | Go | Build Tags & Vendoring.

Quick Documentation

We’ve improved Quick Documentation for Go keywords, channels, iota, type switches, type parameters, type assertions, and a blank identifier.  

More Go-related improvements

  • GoLand no longer scans the cache subdirectory in ~/go/pkg/mod, which should improve performance.
  • We’ve added support for the go:linkname compiler directive.
  • There is a new inspection in GoLand that will warn you if iota is used irregularly. 
  • Another new inspection will warn you if your type has methods on both value and pointer receivers.

Automatic SQL detection

SQL statements are now automatically detected and the language is injected into every string literal that matches a certain pattern.

Run Anything

GoLand now supports the Run Anything action that allows you to quickly launch run/debug configurations, applications, scripts, commands, and tasks, as well as open recent projects. To use it, just press ^ (Ctrl) twice.

HTTP Client

GoLand’s HTTP Client now supports WebSocket connections and can send GraphQL queries. There is also now a way to select a run environment from the play icon on the gutter.

Remote development and Space

We’ve updated the Remote Development section on GoLand’s Welcome screen. Here you can choose your preferred method for backend orchestration. Also, the Space development platform is now bundled with GoLand.

User interface

  • For macOS users, we’ve introduced the ability to merge all open project windows by turning them into tabs within a single window. To do this, go to Window | Merge All Project Windows.
  • We’ve introduced a keyboard shortcut that changes the font size everywhere in the editor. To increase the font size, press ⌃⇧. (Alt+Shift+.). To decrease it, press ⌃⇧, (Alt+Shift+,).

Editor 

  • You can adjust the highlighting style for inspections using the new Highlighting in editor dropdown menu in Preferences | Editor | Inspections.
  • We’ve added the option to toggle whether the IDE automatically inserts parentheses during code completion.

Docker

  • You can now copy images from one Docker daemon to another using the new Copy Docker Image action.
  • GoLand now automatically connects to Docker after you restart the IDE. 
  • GoLand is now integrated with Colima and Rancher.

Databases

  • You can now select multiple CSV files and import them all at once.
  • When working with databases, you now have two file resolve modes: Playground for when you have a set of unconnected queries, and Script for queries that have sequential logic.

Web development

GoLand 2022.2 provides better support for Vue 3. For example, it now understands type narrowing in v-if/else directives. Also, support for Pinia, the Vue team’s recommended state management solution that works as a global store, has been improved. Both completion and resolve now work in Vue with the Pinia library, and you can navigate to state properties and actions defined in the store.

Other improvements 

  • GoLand automatically imports trusted SSL certificates from system trust stores.
  • JSON and YAML files now feature automatically inserted web references inside values that start with http:// or https://.

That’s it! Please tell us what you think about our new features! Leave your comments here, report any issues you encounter to our bug tracker, ping us on Twitter, or drop us a message in the Gophers Slack #goland channel.

image description