GoLand 2018.1 EAP 4 is Here: Partial Commits for Git, Attaching Debugger to Local Processes, and More

Following the train of EAPs of the IDEs based on the IntelliJ platform, GoLand is releasing its own. Welcome GoLand 2018.1 EAP 4. The update brings in the improvements from the platform, such as the long-awaited support for partial Git commits together with Go-related improvements and some new features. Below you’ll find more details. Anyone wanting to just get going with it is welcome to download the update through the website, the IDE, or the Toolbox App.

First, let’s get into the new Go-related features and improvements. The IDE is now able to attach the Debugger to locally running processes (GO-4867). The only thing you have to do is click Run in the main menu and choose Attach to Local Process:

The IDE will prompt you to select a process to debug:

Note, the IDE may also prompt you to install the gops package. When asked, please click to agree to do so in the popup. The IDE will do it automatically. After that, you’ll be able to attach the debugger to local processes.

Once the process is selected, it will open the Debugger tool window and be ready to stop at breakpoints:

Another area of improvement brought by the update is Postfix Completion.

All the templates can now be disabled or enabled. Earlier some of the templates were not present in the Settings (GO-5165):

Here in the list, you will also notice there is the new template “.if” (GO-4094). It’s very convenient to transform an entered bool expression into an if statement:

If a bool expression is a check for nil, make sure to use “.nn” or “.nil” templates instead because they are designed exactly for that.

When a template is applied to a function argument, the IDE sometimes used to apply the template to the function instead of the argument. The update fixes this issue (GO-5125).

Also, the IDE now does not run Example functions within go tests if those functions have no output values (GO-2029). The Gutter icon is also not shown for such functions.

The Go Scratch Files are now created from the predefined templates that can be customized in Settings | Editor | File and Code Templates:

Secondly, let’s now have a look at the platform-level improvements. Yes, you got it right from the intro to this post. This update supports partial Git commits (IDEA-63201).

Now you can choose which individual changes within a file to commit:

Also, now you can assign these individual changes within a file to different Changesets. To do this, click the change marker on the Gutter (the left-hand pane of the editor):

Last but not least, in case you have several repositories configured for the project, the VCS tool window will allow you to group the changes by the repositories. To do that, use the corresponding icon on the right-hand toolbar of the Local Changes tab.

That’s it for now. For the complete list of changes, please check out the release notes. Your feedback as always is welcome here in the comments or even better right in the issue tracker.