Early Access Program

GoLand 2022.3 EAP #5: Support for Links, Lists, and New Headings in Go Doc Comments

The fifth build of the GoLand 2022.3 EAP 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.3 EAP #5

Updates to Go doc comments

The latest Go release, version 1.19, has added support for links, lists, and new headings in doc comments. 

Starting from this EAP build, GoLand also supports these new features. 

Support for links 

There are two types of links in Go doc comments: links and doc links. 

Here’s what links look like: 

// Package json implements encoding and decoding of JSON as defined in
// [RFC 7159]. The mapping between JSON and Go values is described
// in the documentation for the Marshal and Unmarshal functions.
//
// For an introduction to this package, see the article
// “[JSON and Go].”
//
// [RFC 7159]: https://tools.ietf.org/html/rfc7159
// [JSON and Go]: https://golang.org/doc/articles/json_and_go.html

Doc links are “links of the form [Name1] or [Name1.Name2] to refer to exported identifiers in the current package, or [pkg], [pkg.Name1], or [pkg.Name1.Name2] to refer to identifiers in other packages”.

Here’s an example from the Go documentation

// ReadFrom reads data from r until EOF and appends it to the buffer, growing
// the buffer as needed. The return value n is the number of bytes read. Any
// error except [io.EOF] encountered during the read is also returned. If the
// buffer becomes too large, ReadFrom will panic with [ErrTooLarge].
func (b *Buffer) ReadFrom(r io.Reader) (n int64, err error) {
    ...
}

We’ve added references to doc links in GoLand. Clicking on them leads to the referenced element, while clicking on a text link leads to a text-link definition. 

Both text and doc links are rendered as links in the Quick Documentation popup and the Documentation tool window.

To see the Quick Documentation popup, press F1 (Ctrl + Q). To open the Documentation tool window, press F1 (Ctrl + Q) again. 

Support for new headings 

Starting from Go 1.19, a  heading is a line that begins with a number sign (#) followed by a space and the heading text. Before, headings were identified “implicitly by single-line paragraphs satisfying certain conditions, most notably the lack of any terminating punctuation”.

New headings are rendered as HTML headings in GoLand’s Quick Documentation popup and the Documentation tool window.

Support for lists

A list item consists of a star, plus, dash, or Unicode bullet, followed by a space or tab and then text. Lists are rendered as HTML lists in GoLand’s Quick Documentation popup and the Documentation tool window. 

Databases: Redis support

A preliminary iteration of long-awaited support for Redis has been implemented.

User interface 

Improved Tips of the Day

We’ve enhanced the Tips of the Day feature – a learning tool that helps you explore GoLand and its features. 

Each tip now has a heading to help you understand which area of the IDE is being described and decide whether you want to learn more about the topic or skip it.

We’ve fine-tuned the algorithm that determines which tips appear so you’ll see the ones that are most relevant to your experience with the IDE and the project you’re working on. 

With the new approach to sorting, you’ll first see tips about features you’ve never used before while tips that are considered irrelevant to the specific project (based on the file extensions and technologies being used) won’t be shown initially.

Updated bookmarks 

We’ve implemented a few UI improvements to fine-tune the Bookmarks functionality after the merge of the Favorites and Bookmarks instances in the 2021.3 release.

It is once again possible to bookmark files from editor tabs. Just right-click on a tab to invoke the context menu and select Bookmarks.

In addition, you can add all files in all open tabs to Bookmarks. You can either invoke the same context menu and select Bookmark Open Tabs, or call this action using the three-dots icon located on the right-hand side of the editor tabs pane. The IDE will put all open tabs into a new list of bookmarks, which you can name as you like.

Other improvements 

Installers for Windows ARM64

We’ve started distributing installers for Windows ARM64 – you can already download them from our website or the Toolbox App.

That’s it for today! We’d love to hear what you think about the new features. Ping 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 for reading!

Discover more