Go logo

GoLand

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

Early Access Program Features

GoLand 2018.1 EAP 5: Dep Integration, Smarter Auto-Imports, Scratch Files, Faster Rename and Find Usages, and More

A fresh GoLand 2018.1 EAP build is here, and as always, it comes with lots of new features and bugfixes! Below is a quick overview of the changes.

Dep

The most important news about the update is the support for dep, the official experimental dependency management tool. The update is capable of importing existing dep projects and also provides a project wizard for creating new dep projects.

To create a new dep project, open the Project Wizard and switch to the Dep tab on the left-hand side of the dialog:

To create or work with a dep project, you have to fill the Dep location with the path to the dep binary.

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

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

After you click it, the IDE will run the command and afterward automatically sync the changes in the vendor folder.

The path to the dep location can always be changed in Settings | Go | Dep:

Auto-import

The auto-import mechanism has been made smarter with this update and it now only applies it if the resulting code compiles with no errors (GO-1730). If the resulting code cannot apply without errors, the IDE prompts a quick-fix that adds the corresponding import statement – so you can call it manually.

Code completion

Code completion suggestions for boolean expressions now can be selected and negated by simply pressing “!” (GO-5411):

Scratch files

A scratch file, created from a Go code selection, now gets all proper import statements automatically. If you haven’t used Scratch Files yet, make sure to try them as they offer a “Go Playground”-like editing session with full IDE support.

Misc

The two other minor yet very important improvements are:

  • The global symbols now can be renamed and searched for usages much faster.
  • The inspection that reports type mismatch now respects type aliases (GO-5190 and GO-5408).

Additionally, if you are wondering about support for vgo, the new experimental tool for dependency management, please keep an eye on GO-5390. We will post updates there when we have them.

Last but not least, GoLand 2018.1 now offers a brand new plugin for Kubernetes.

To learn more about the plugin, read its announcement in IntelliJ IDEA’s blog.

That’s it for now. Now go ahead and try all these improvements for yourself! The update can be downloaded from the website, the Toolbox App, or from the IDE if you run the latest EAP build.

Happy developing!

image description