GoLand 2021.2 has been released!
Read this post in other languages:
The second major release of the year is out!
In GoLand 2021.2 you’ll find new features for Go modules, a new option for formatting, and support for Go 1.17 features. We’ve added new quick-fixes, including one that will help you use the new //go:build syntax correctly, and much more!
On top of that, we have new features for web development and for working with databases. All the new functionality available in DataGrip and WebStorm is also available in GoLand. Check out DataGrip 2021.2 What’s New and WebStorm 2021.2 What’s New to discover the new functionality.
To learn more about the new features in GoLand 2021.2, head over to our What’s New page, where you’ll find a full overview of the release along with GIFs and screenshots.
Would you prefer a more interactive approach to learning about these new features in GoLand? Complete the What’s New in GoLand 2021.2 tutorial from the Welcome screen.
- In GoLand 2021.2 you can load go.mod changes manually. When the dedicated option is enabled, you can edit go.mod and then click a dedicated icon to load the changes.
- GoLand will display an error if you are using features that are from a newer version of Go than the one specified in your go.mod file. For numeric literals and //go:embed statements, a quick-fix is available that will change the Go version in go.mod.
- The Go option on the Welcome screen is now the default option for Go modules projects. We have also renamed GOPATH-based projects to Go (GOPATH).
- Unused dependencies in replace directives are now highlighted in grey. You can use a quick-fix to download the unused modules.
We have introduced the Run gofmt on code reformat option. When this option is checked, you can invoke gofmt and GoLand’s built-in formatter with the shortcut Ctrl + Alt + L (⌘+⌥+L), and gofmt will be run after GoLand’s formatter.
- A new quick-fix will move //go:build lines to the top of the file, as the new syntax requires. There is also a quick-fix for generating // +build lines in addition to //go:build lines.
- If you imported a “C” package but then forgot to enable cgo support in the project settings, GoLand will display a banner with the Enable cgo support quick-fix.
Preview mode now works when you debug your application. It lets you open the files successively in one tab.
In Go 1.17 it will be possible to convert a slice to an array pointer. GoLand will not mark these conversions as errors.
You can Navigate to implementations of the interfaces contained in the internal folder.
- GoLand 2021.2 allows you to sign commits with a GPG key.
- You can now Run tests and Analyze code before committing your changes.
- A new search field in the Local History menu.
- The node that stores all uncommitted changes is now called Changes.
- Attached projects now appear in the Project view as separate directories.
- We’ve added navigation arrows and a new Advanced Settings node to Settings/Preferences.
- GoLand will inform you when a new version is available and give you the option to update right from the IDE.
- You can now change the cursor shape in the built-in terminal. Also, we now support the Use Option as Meta key setting.
- We’ve streamlined the dialog that allows you to customize your project icon in the projects list on the Welcome screen.
- Rename refactoring now works for useState React hooks.
- GoLand adds missing require() statements as you complete CommonJS modules.
- Code completion now works for private npm packages.
- Extended support for web-types.
Work with databases
Code completion now works in the MongoDB console.
- We’ve collected all the possible on-save actions in one place.
- Old cache and log directories will be deleted automatically.
- Spelling and grammar checks in Go files are enabled by default.
- Fully localized UI in Chinese, Korean, and Japanese.
Code With Me
You can now keep track of which Code completion suggestions GoLand offers to your colleagues during Code With Me sessions.
As always, we’d love to know 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.