Go logo

GoLand

A cross-platform Go IDE with extended support for JavaScript, TypeScript, and databases

Early Access Program Features

GoLand 2018.1 Public Preview is Here

If you’ve been following our recent news, you probably know that for the last three months we’ve been working on GoLand 2018.1 – the next major update of your beloved IDE. During the last two months, the update has been available for early preview with our EAP program. Today, with most of the work finished, we’re happy to announce a public preview of the upcoming update. What does it mean? That from today we’re no longer working on changes and focusing on bug-fixes. It also means the update is ready for mass preview. You’re very welcome to download it and share your feedback with us through our issue tracker. Those of you who use Toolbox App will find the update available there. If you’re curious about what the major changes in the update, read the rest of this post below, and share it with your friends!

Refactorings

In the update, we’ve added the Move refactoring. This refactoring allows you quickly move any top-level member to another file:

The name suggestion algorithm used by Extract Variable, is now aware of the context and avoids name collisions.

The Rename refactoring (as well as Find Usages) for global symbols is now much faster.

Code Completion

A bool expression suggested by code completion can now be selected and negated at the same time by pressing “!”:

If the caret stays on the right-hand side of a return statement inside a function, the code completion now suggests the default values corresponding to the return type of the function:

The update adds two new Postfix Completion templates.

  • The new “.if” template transforms a bool expression into an if statement:

  • The new “.p” template prepends an expression with a pointer operator.

Intentions

There’s a number of new intentions added to the update, e.g. Flip for binary expressions, and Negate recursively and Negate for boolean expressions:

In addition to Negate, for an if statement, you now can use Invert:

Other coding assistance

Here’s a list of some other improvements that will make your life much easier:

    • The auto-import mechanism has been made smarter and now applies only if the resulting code compiles with no errors.
      • If you now press Enter when the caret is on a chain call or a string literal, the IDE auto-formats the resulting code.
      • The editor is now able to remove import statements for unused packages as you type. The option is called Optimize imports on the fly. You can enable it in Settings | Go | Imports.
      • The Quick Documentation pop-up is now aware of example functions and includes them as part of the documentation. If you click the example function’s name, the IDE will open a Scratch File with the code of the function:

Scratch Files

If you didn’t try them earlier, Scratch Files, mentioned above, offer a “Go Playground”-like editing session with full IDE support. In this update, they were also improved.

First, a Scratch File, created from a Go code selection, now automatically gets all proper import statements.
Second, Scratch Files are now created from the predefined templates that can be customized in Settings | Editor | File and Code Templates.

Debugger

The update now allows you to attach the Debugger to locally running processes. To do that, the only thing you have to do is clicking Run in the main menu and choose Attach to Local Process:

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

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

Dep

The other major news is that the update has support for dep, the official experimental dependency management tool.

If you import an existing dep project, the IDE will detect dep and will prompt you to enable dep integration.

When you work with a dep project and open a file that has an unresolved import statement, the IDE will offer a quick-fix that runs dep ensure:

Go 1.10 support

The coding assistance provided by the IDE has been updated to fully support all the Go 1.10 features.

Code Style

The Code Style settings have some new options: Use back quotes for imports, Add parentheses for a single import, and Add leading space to comments.

VCS

Some more major news about the update is that it now finally supports partial Git commits.

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

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):

When you’re doing a rebase, there are now the new Abort Rebase, Continue Rebase, and Skip Commit actions available in the Git Branches popup.

Finally, the VCS tool window now allows you to group the changes by the repositories.

User interface

The Replace in Path popup now previews replacements even if a regular expression is used.

Now any folder in the Project tool window can be easily opened in the Terminal tool window. The action is called Open in Terminal.

Also, the IDE now respects fractional scale factors when multiple HiDPI monitors are used.

Performance

To improve the IDE performance, the update allows you to limit the indexing scope for your project, e.g. to avoid indexing an entire GOPATH.

JavaScript/TypeScript

The support of the frontend-related technologies such as TypeScript and JavaScript have got a lot better thanks to the efforts of the WebStorm team.

Here’s a brief list of the most notable changes:

      • TypeScript 2.7 support
      • The new Surround with type guard quick-fix is available for unresolved properties.
      • The Rename refactoring for classes now offers to rename the file as well. The refactoring is now available as an intention action on classes.
      • If you have the prettier package installed, the IDE will provide the Reformat with Prettier action.
      • The new Extract a Vue component refactoring.
      • The package managers are now easier to manage. You can now specify explicitly whether to use npm or Yarn to install dependencies and run scripts.
      • If you’ve migrated to webpack 4, the IDE offers coding assistance for option names in the webpack configuration file.
      • The npm scripts can now be run similar to tests using the gutter icons right in the editor.

For more details on these changes, take a look at the WebStorm 2018.1 page.

Misc

Last but not least, the update offers a brand new plugin for Kubernetes:

For more details on how the plugin works, read the corresponding blog post in the IntelliJ IDEA blog.

For a more complete list of changes in the update, refer to the GoLand 2018.1 page on our website.

That’s quite a list. Hope you’ve found at least one thing important or useful for yourself. If not, let us know what you’re missing or would like to have.

If you come across a bug, make sure to report it to our issue tracker. This will greatly help us make the release better.

Finally, the public preview is available for download on the website as well as with Toolbox App.

Happy developing!

image description