Starting with Go 1.15, you can change the default location of the modules cache from
$GOPATH/pkg/mod to another folder using the new GOMODCACHE environment
To do that, just set GOMODCACHE in Preferences/Settings | Go Modules | Environment. The IDE will recognize the custom location and use it for all subsequent actions with dependencies.
The Comment With Line Comment (Ctrl+/ on Windows/Linux and ⌘/
on macOS) action is now
available for the
GoLand now immediately adds a closing brace when you type the opening brace for replace, exclude, and require statements.
The IDE displays references from comments to related package-level declarations and lets you navigate to them via the Navigate to Declaration or Usages action (⌘B on macOS and Ctrl+B/ on Windows/Linux).
The new Inspections Widget shows the number of warnings, errors, and typos in the current file in the upper right-hand corner of the code editor. You can go through them using the arrow icons or the Next Error action (F2).
The widget lets you configure the highlighting level (select from none, errors only, or all problems), change the severity level of inspections, and toggle it to the Compact View so it won’t distract you.
The Problems tool window displays a list of warnings and errors in the current file, gives you a description of those problems, and lets you fix them immediately using Alt+Enter.
To open the Problems tool window, click on the Inspections Widget or go to View | Tool Window | Problems. Right-click on a problem to move directly to the line of code where the error occurred.
A new code inspection handles possible problems with
the UTF-8 representation of the Unicode code point
x instead of the expected
GoLand notifies you about such potential mistakes and provides dedicated quick-fixes.
GoLand will notify you about common erroneous usages of tests and examples, so you don’t
go vet explicitly for that anymore. The IDE also provides quick-fixes in
simple cases; for
example, it suggests renaming
The Malformed struct tag code inspection will check that struct tags conform to Go conventions and notify you about potential problems.
The Impossible interface type assertion code inspection checks for type assertions
corresponding type-switch cases in which the static type
an interface that cannot possibly
implement the target interface
This occurs when
T contain methods with the same name but
To preview the result of an intention action or quick-fix before you apply it to your code, invoke the Show Context Actions with the Alt+Enter shortcut, select the required intention action or quick-fix, and press ⌥+Space on macOS or Ctrl+Shift+I on Windows and Linux.
The new Add Caret Per Selected Line action creates carets at the end of each selected line and deselects the lines. Invoke it using the shortcut Alt+Shift+G on Windows/Linux or ⌥⇧G on macOS.
Configure wrapping for call arguments, function parameters, and composite literal elements in Preferences/Settings | Editor | Code Style | Go | Wrapping and Braces.
Alternatively, you can use the Put arguments on separate lines and Put arguments on one line intention actions using Alt+Enter to split and join elements manually.
The Introduce Variable refactoring (Ctrl+Alt+V on Windows and Linux, or ⌘⌥ V on macOS) can pack some variadic arguments into a new slice variable, while Inline Variable (⌥⌘N on macOS and Ctrl+Alt+N on Linux and Windows), conversely, unpacks a slice into variadic arguments.
In addition, you can now handle issues with unpacked variadic arguments via the Unpack slice quick-fix.
You can now reuse projects or files by saving them as custom project templates: select Tools | Save Project as Template. The IDE will recreate the project tree with files, folders, and build configurations.
You can now share and execute code in the Go Playground by double-clicking inside the editor. Just choose Go Tools | Share in Playground in the dropdown menu, or Tools | Go Tools | Share in Playground, or you can press ⌥⇧⌘S on macOS or Ctrl+Alt+Shift+S on Windows/Linux.
This also works for
go2 files to play with generics, in which case GoLand
will take you to the new https://go2goplay.golang.org/.
The Go Team recently announced a draft design for generics. Please visit the Golang documentation for full details of the concept.
GoLand 2020.2 provides experimental support for generics that you can play with by turning on the Enable experimental support for generics a.k.a. type parameters setting in Settings/Preferences | Go.
This initial support provides syntax highlighting and basic reference resolution, and works in go2 files only.
With vendoring mode enabled, you build your application with only the dependency packages that are stored in the vendor folder in your project.
Now if a project has a vendor folder and you’ve checked the Enable vendoring mode automatically setting in Settings/Preferences | Go | Go Modules, resolve will only use the vendor/ folder and will not consult the modules cache.
go list commands sequentially and provides a progress bar with
the actual numbers of
go list commands in the queue.
GoLand 2020.2 will allow you to use Git from WSL 2, which is natively available in the May
update of Windows 10, version
2004. If Git is not installed in Windows, GoLand will
automatically look for Git in WSL and use it from there. It will also automatically
to Git from WSL for projects opened from WSL (via
We’ve redesigned the Git dialogs for actions such as Merge, Pull, and
Rebase to make them
more consistent and informative. We’ve also made it easier to understand which Git
will be executed, and added the
–rebase option to the Pull dialog
to the Merge dialog.
GitHub Pull Requests is fully equipped! Browse, assign, manage, and even merge pull requests, view the timeline and inline comments, submit comments and reviews, and accept changes without leaving GoLand.
Now when you are comparing 2 branches in GoLand, you’ll be able to see the commits of the compared branches in one view. The IDE will now open the logs of both branches being compared in the editor instead of in the VCS tool window, where there is not enough space to display all the information.
Now if you have a huge value in your cell, it can be viewed or edited in a separate panel. You can also toggle soft wrap mode using the right-hand toolbar. Use all the power of our code editor for your data!
Starting with this version, you can review the query that represents your changes in the data editor. There is now a DML button that is active if there are pending changes.
And you will see a dialog with the DML preview. This query is not the exact SQL that will be run to modify your data, because GoLand uses a JDBC driver to update tables, but most of the time it will be the same.
There’s now a more user-friendly way to view and edit boolean values. True values are now marked with a bullet point to distinguish them from all the others.
We’ve added a new SQL dialect: Google BigQuery. Full support for BigQuery is not here yet, but all things must begin somewhere. GoLand can correctly highlight and provide coding assistance for your queries if you use Google BigQuery.