Hi, Habr!
Last week
GoLand 2018.2 was released . In this article we will tell about what appeared in the new version.

')
What's new in brief:
- support for Go modules (formerly known as vgo);
- improved Move- refactoring and new automatic fixes;
- additions to the Postfix Completion and Intention Actions ;
- the debugger now supports breakpoints that do not require complete program interruption, as well as deferred loading of arrays, slices and dictionaries.
In addition, many improvements came from the IntelliJ platform: from innovations for version control systems and Touch Bar support for MacBook Pro to the latest innovations from the world of front-end development.
Go module support (vgo)
In February, the Go team announced a trial version of the new dependency management tool, and we immediately decided to start working on supporting it.
GoLand allows you to create projects of the new type (
Go Module ) and offers to synchronize dependencies in one click directly from the code editor.

Read more about the Go module support
here (
English article ).
Move refactoring
In the previous release, GoLand appeared
Move- refactoring, which can quickly move any ad to another file within the same package. In this version, we taught him to move characters between packages.
To see the whole picture, we added a new interface that shows elements that depend on the object being moved. Export and transfer these dependencies with it.

Quick code fixes
There are new automatic fixes for type mismatch errors:
Convert to expected type and
Implement missing methods .
Convert to expected type converts the value to the expected type in accordance with the
requirements of the language :
Implement missing methods in one click adds the missing methods, if the expected type is the interface:

Code generation
Implement Methods can now not only add methods from an interface to existing types, but also create a new type with the implementation of interface methods:

Code editing
New
Add dot import alias action allows you to refer to all exported names without using the package name. The reverse action of
Remove dot import alias undoes these changes.
Introduce local variable refactoring is now available via Alt + Enter. The quick action writes the result of the execution of functions and methods to a new local variable.

Postfix templates
The new
.sort template adds a sorting method to arrays and slices based on the type of elements. If the elements are of a custom type, the
sort.Slice method will be used.
For ease of use, we merged the
.rre and
.rrv templates into one new -
.rr , it can be called both on expressions and on variable names.

Code style
After studying the recommendations for Go-developers on the design of the code, we added highlighting for comments that do not begin with a space, and taught the IDE to format them by adding the missing space. After a while, it turned out that some libraries (for example,
easyjson ), on the contrary, require their absence!
For libraries with a similar requirement, we added an exclusion list for the
Add leading space to comments option. It helps to avoid unnecessary spaces, it is enough to make the necessary prefixes. Enabled here:
Settings / Preferences | Editor | Code Style | Go | Other .

Debugger
In the new version, the debugger supports breakpoints that do not require complete program interruption. The values of arrays, slices and dictionaries are loaded lazily, and the structures can now be expanded without nesting level restrictions.

File watchers
A small but very nice improvement came from
File Watchers in this release. Previously, it was necessary to configure
File Watchers for each project separately, now the settings can be reused between projects.

Version Control System
Briefly about merging conflict resolution: it is easy to make a mistake, the problem is not easy to find and difficult to fix. We decided to make this process less painful, so the version control system now groups files with merge conflicts for each changelist. The improved
Files Merged with Conflicts dialog
box shows the names of branches when performing
Pull ,
Merge , or
Rebase and groups files into directories.

There are many improvements to the
Log window, you can now:
- Open as many log windows as you need;
- Delete Git-tag from commit;
- Filter commits by selected branches;
- To study the Diff Preview Panel without leaving the Log window;
- Monitor the status of the repository using the new action Browse Repository at Revision .

In addition to the changes to the
Log window, VCS has become better in several ways.
For example, in the new version you can commit and push changes in one click without the
Push dialog:

And also manage any number of GitHub accounts without switching between them:

User interface
MacBook Pro owners, don't pass by: GoLand 2018.2 supports Touch Bar. All the available tools for the touch panel can be customized to suit your needs:
Settings | Appearance & Behavior | Menus and Toolbars .

Another news for macOS users: now the window headers can be made dark. To do this, you must enable the
Use dark window headers option in
Settings | Appearance & Behavior | Appearance .

Icons have changed color, shape and style. Details can be found
in this post (
in English ) from our interface design team: they share how they made decisions and what they plan to do in the future.
Javascript / typeScript
By tradition, we talk a little about the changes in support for front-end technologies, here are some of the most significant:
- Support TypeScript 2.9 and TypeScript 3.0;
- Many new intention- actions: Implement interface , Generate cases for switch , Create interface class , Iterate with interface for Create..of .
- Now you can find all the unused code with a new code coverage feature.
You can read more about these and other improvements on the
What's New page of the WebStorm team.
That's all! As always, we will be glad to hear your opinion here in the comments, on
Twitter or
bug tracker :)
Download the update on the
download page or through the
Toolbox App .
Just in case, I remind you that if you already use IntelliJ IDEA Ultimate, then all GoLand features are available right there, you just need to install this
plugin .
Thanks for attention!