GoLand 2018.1 EAP 2 is Here
Last week we announced the opening of GoLand 2018.1. Today we’re glad to present you with a fresh EAP build with a number of improvements. Read on to learn about them in more detail, or go ahead and install the update in whatever is your preferred way: download from the website, update from the IDE, or update from Toolbox App.
The editor is now able to remove import statements for unused packages on the fly as you type. This is convenient as you don’t have to remove those import statements by yourself anymore. The IDE does it for you:
This option is called Optimize imports on the fly. You can enable it in Settings | Go | Imports:
The Build run configuration earlier didn’t allow you to use -o in the Go tools arguments field. Now it does, and overrides the value set in the Output directory field:
When debugging, the IDE now distinguishes shadowed variables in the Watches and Variables tabs of the Debugger tool window:
The name suggestion algorithm is now aware of the context and avoids name collisions, e.g. when extracting variables.
Some of the inspections that correspond to go vet and which are supposed to run before go test in Go 1.10 were improved. A few examples are given below:
1) In the following case, the IDE doesn’t offer to simplify the second part of the boolean expression:
2) The IDE warns about type mismatches for the calls of fmt.Printf:
3) The IDE reports invalid build tags:
And last but not least, if you now click Enter when the caret is on a chain call or a string literal, the IDE auto-formats the resulting code:
That’s it for today. For a more complete list of changes in the build, refer to the release notes.
As always, your feedback along with bug reports and feature requests is very welcome in our issue tracker!