Early Access Program

Support for fmt.Appendf, Resolve Modes for Databases, and More in GoLand 2022.2 EAP #7

GoLand 2022.2 EAP #7 is now available! You can get the EAP build via the Toolbox App, download it from our website, use a snap package for Ubuntu, or from inside GoLand select Check IDE updates for Early Access Program in Preferences / Settings | Appearance & Behavior | System Settings | Updates

Download GoLand 2022.2 EAP

Support for fmt.Appendf

Go 1.19 introduces three new functions to the fmt package: Append, Appendln, and Appendf. Here’s how the Go team describes them:

These are straightforward variants of the existing Sprintf etc., but append the resulting bytes to a provided buffer rather than returning a string.

We’ve added support for fmt.Appendf, and now GoLand identifies formatting verbs inside strings. As a result, the Appendf function gets all of the features that formatting functions have, like the Add a format string argument intention action.  

Performance optimization: stop scanning ~/go/pkg/mod/cache 

When you work in GoLand, the IDE scans GOMODCACHE (~/go/pkg/mod) to suggest dependencies. GOMODCACHE includes a cache subdirectory that contains some metadata and other information that is not needed for GoLand to work correctly. 

We decided to stop scanning the cache subdirectory. This folder can be fairly large, and we hope that excluding it from the scan will improve performance. 

Resolve modes for databases

When working with the databases, you now have two file resolve modes: Playground and Script. You should choose the Playground mode if your SQL script is just a set of unconnected queries, independent of each other and with no particular sequence. 

If your queries have sequential logic and should be run as a single script, choose the Script mode. A detailed description of this new workflow is available in this post from the DataGrip team.

Change the highlighting style for inspections

If you want to change the highlighting style for an inspection, you can configure this using the new Highlighting in editor dropdown menu in Preferences/Settings | Editor | Inspections

This change gives you more options for customizing inspections. For example, you can set the severity level of a particular inspection to Warning but change the highlighting style to Error. With this configuration, GoLand will display a yellow triangle in the top right corner of the editor and in the Problems window, but the relevant code will be underlined by a red squiggly line.   

That’s it for today! We value your feedback – please feel free to get in touch with us on Twitter, leave your comments here, open an issue in our tracker, or drop us a message in the Gophers Slack #goland channel. Thanks!

Discover more