GoLand 2021.2

Adiciona novos recursos para módulos Go e suporte para recursos Go 1.17.
Agosto 02, 2021 - 12:56
Nova versão


  • Go modules
    • Load go.mod changes manually - With this release you can now control how the IDE makes calls to go list when you edit go.mod and you can also load go.mod file changes manually. GoLand can now stop making calls to go list automatically when you edit files inside the IDE. Instead you will see a Load Go modules Changes icon, which you can click to manually load the changes when you are finished editing. If you untick the Reload project after changes in the build scripts checkbox, you will see the Load Go modules Changes icon on all types of changes - both external and internal ones.
    • Better support for different Go versions - 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.
    • Go for Go modules - The Go option on the Welcome screen is now the default option for Go modules projects. GOPATH-based projects have been renamed to Go (GOPATH).
    • Dealing with unused dependencies - Unused dependencies in replace directives are now highlighted in grey. This will help distinguish them from errors. If you hover over one of the grey lines, you will see an “Unused dependency” message. If you need to download the unused modules, press Alt+Enter and choose the Download all modules to the module cache option. You can also download individual modules.
  • Formatter - In this release, the Run gofmt on code reformat option has been introduced. It’s the first step towards making gofmt more discoverable in GoLand, which has its own formatter. When this option is checked, you can invoke both formatters with a shortcut, Ctrl+Alt+L, and gofmt will be run after GoLand’s formatter. This option is enabled by default and can be toggled in Settings | Editor | Code Style | Go.
  • More quick-fixes
    • Support for the new //go:build constraints formatting - GoLand has a couple of new quick-fixes to help you correctly use both the old // +build constraints and the new //go:build syntax. The first quick-fix will move the //go:build lines to the top of the file, as the new syntax requires. And since in Go 1.16 you can use either the old syntax or both of them together, there is a quick-fix for generating // +build lines in addition to //go:build lines.
    • Enable cgo support with one click - 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. There is also the Navigate to cgo import option, which will put the cursor at the beginning of the package’s name. This can help you find the import statement in a big project.
  • Debugger - Preview mode now works when you debug your application. It lets you open the files successively in one tab, which helps you avoid cluttering the editor with multiple open files in separate tabs.
  • Go 1.17 - In Go 1.17 it is possible to convert a slice to an array pointer. GoLand will not mark these conversions as errors.
  • Quick navigation - Starting with this release, you can Navigate to implementations of the interfaces contained in the internal folder. Click on the gutter to jump to the implementations. You can also jump back to the interface from its implementations.
  • VCS updates
    • GPG signature - This release offers a way to secure your commits by enabling Git commit signing with GPG.
    • New options in pre-commit checks - You can now Run tests and Analyze code before committing your changes. Please be aware that the Run tests option is only available if you tick the Use non-modal commit interface box in Settings | Version Control | Commit.
    • New search field in the Local History menu - Added a new search field to the Local History menu, which tracks changes independently of version control. It can help you quickly find the text you are looking for in your Local History revisions. Please note that Local History shouldn’t be used as a substitution for VCS. It is recommended to make VCS your default choice for tracking changes and using Local History as a last resort.
    • Changes instead of Default Changelists in new projects - You no longer need to use Default changelists as the name for the node that stores uncommitted changes in new projects. Starting from version 2021.2, it is called Changes. Additionally, Git operations will no longer trigger automatic creation of changelists.
  • UI improvements
    • Better view of attached projects - Changed how attached projects are represented in the Project view. They used to be represented as child directories of the existing project. Attached projects now appear in the Project view as separate directories.
    • Advanced settings and navigation arrows - Added a new Advanced Settings node to Settings. It contains additional configuration options, allowing you to, for example, configure a left margin for Distraction-free mode. There is also a new navigation option in Settings. You can now navigate back and forth between sections using the arrows in the top right corner of the window.
    • Update notifications from the Toolbox App - When any product updates appear in the Toolbox App, your IDE will now inform you. If there is a new version available for download, you’ll be able to upgrade to it right from GoLand. Toolbox App 1.20.8804 or later is required to use this feature.
    • New terminal options - You can now change the cursor shape in the built-in terminal to underline or vertical. There is also a change in the Terminal settings. The Use Option as Meta key setting is now supported. A Meta key temporarily modifies the normal action of another key when they are pressed together. Using a Meta key can be helpful if you use the terminal a lot.
    • New Change project icon window - Streamlined the dialog that allows you to customize your project icon in the projects list on the Welcome screen. To upload a custom icon, just right-click on a project and select Choose project icon from the context menu.
  • Web development
    • Reload pages in browser on save - GoLand can now update the pages in a browser as you edit and save your HTML, CSS and JavaScript files.
    • Rename refactoring for React useState hooks - Refactoring now works for useState values and functions in React hooks.
    • Auto-import for require() - The IDE can now add missing import statements as you complete CommonJS modules – required imports will be inserted on code completion.
    • Completion for private npm packages - Adding new project dependencies to package.json has become even easier, as code completion now works for private npm packages. GoLand lets you check information about the latest versions of the package, just like it does for public packages.
    • Generic support for web-types - Extended support for web-types, an open-source standard for documenting web frameworks. It was previously focused on Vue support. But now you can use it to enrich the coding assistance for custom components in your HTML files.
  • Work with databases - Code completion now works in the MongoDB console for fields, nested fields and fields inside aggregation expressions. It also works for query and projection operators, update operators and aggregation stages.
  • Other changes
    • Actions on save - All the possible on-save actions have been collected together in Settings | Tools | Actions on Save. You can now configure all of them there – just tick the checkbox next to the action you want to enable. You can also configure the settings for any action, to do so, hover over it, click the configuration link and fine-tune the action on the related settings page that appears.
    • Automatic cache and log cleanup - GoLand will clean up any cache and log directories that were last updated more than 180 days ago. The system settings and plugins directories will stay intact. To trigger this process manually, go to Help | Delete Leftover IDE Directories in the main menu.
    • Intelligent spelling and grammar checks in Go files - Enabled intelligent spelling and grammar checks in Go files by default. These checks are provided by the Grazie plugin, which is bundled with the IDE.
    • UI in Chinese, Japanese, and Korean - GoLand now has a fully localized UI in Chinese, Korean, and Japanese. Localization is available as non-bundled language pack plugins, which can be easily installed in GoLand.
  • Code With Me - You can now keep track of which Code completion suggestions GoLand offers to your colleagues during Code With Me sessions. To use this feature, you need to be in Following mode.
New features for Go modules


Um IDE multiplataforma construído especialmente para desenvolvedores Go.

GoLand também está disponível em:

Tem alguma pergunta?

Chat ao vivo com nossos especialistas de licenciamento de JetBrains.