GoLand 2018.3 Early Access Program is open: Change Signature refactoring, support for Testify, debugging GAE applications, and more
Today we are opening our Early Access Program for the upcoming 2018.3 release of GoLand. We cordially welcome you to try the new features and share your feedback with us! To get this update working on your machine and try it out: from the website, via Toolbox App, or right from the IDE! For the last option, you need to be sure that you turn on Automatically check updates for Early Access Program in Preferences / Settings | Appearance & Behavior | System Settings | Updates.
Click a topic below to learn about a specific area you’re interested in, or read the whole blog post to get up to speed on all the improvements:
- New Change Signature refactoring and an upgrade for Inline refactoring
- Quick-fix: Finish Call Expression
- Code Inspection: Unhandled Error
- Intention Action: Add format string argument
- Debugger enhancements
- Support for debugging Google App Engine applications
- Support for Testify
- Update for the Complete Current Statement action
- Generate any test action via the Generate popup menu
- Even more changes
- Important bug-fixes
If you are new to GoLand, here is a short explanation of what this Early Access Program (EAP) is about and why it can be useful for you.
First, the EAP lets you try the newest features we’ve baked, fresh out of the oven. Second, EAP builds are free for 30 days after the build date. This would sound pretty lame if I didn’t add that we provide fresh builds until a stable release is almost here. For this upcoming version 2018.3, this will last through approximately mid-November. This makes the EAP a great chance to get an extended trial, try the newest features, and not spend a penny!
The only fly in the ointment is that EAP builds are not fully tested and might be unstable.
We do love hearing from you and your feedback is vital for making GoLand as good as it can be! After the 2018.2 release, we presented the most active evaluators with a free 1-year GoLand subscription. Maybe after this release, you will find your name in the list? We appreciate all feedback – not just bug reports but feature requests and any suggestions you may have, too.
Change Signature refactoring
If you’ve used any other JetBrains IDEs before, such as IntelliJ IDEA, PhpStorm, PyCharm, or others, you may already be familiar with this powerful refactoring. It gives you many handy ways to modify a function signature: change the function name; add, remove, reorder, and rename parameters. The Refactoring Preview pane makes every change in your code safe, allowing you to explore the results before they’re applied and discard the change if anything goes wrong.
In a related change, the Inline refactoring gets a tiny but sweet update: now GoLand highlights inlined code after applying the refactoring, to help you more easily catch what has actually happened.
Finish Call Expression quick-fix
You may know the good old Function Call code inspection, which checks whether an expression should be converted into a function or a method call, and if so, provides an appropriate warning: the expression is evaluated but not used. Now, this inspection is augmented with a Finish Call Expression quick-fix, which adds the missing brackets and completes the expression.
Unhandled Error code inspection
A new Unhandled Error code inspection alerts you immediately about functions or methods that return an error whenever an error isn’t being checked. In settings, you can change the severity level for each scope and, if necessary, exclude function names or method names for this inspection.
Intention Action to add format string argument
A new Add format string argument intention action is available to help you generate a placeholder for any provided expression via a popup. It inserts the placeholder into a format string and passes the expression as an argument for the placeholder. In addition, you can enable code folding for format strings that will replace placeholders with corresponding arguments.
Debugger updates
The debugger now makes it easier to work with the Evaluate Expression dialog box and the Watchers pane: it provides code completion, code inspections, and quick-fixes for your expressions!
Support for debugging Google App Engine applications
We’re excited because GoLand now lets you easily run and debug Google App Engine applications locally!
Before you start, make sure to download and install the Google Cloud SDK for App Engine. If no project is currently open in GoLand, click New Project on the Welcome screen, choose App Engine project template, and then select the location for your project and the SDK you want to use. Otherwise, select File | New | Project | App Engine. As a result, you will have a ready-to-go project that contains app.yaml
with the default configuration settings and a main.go
file with a basic request handler.
Starting to run/debug the application is also pretty easy with the predefined App Engine run/debug configuration! Press ⌃ R on Mac / Shift + F10 on Windows/Linux or click the Run button to launch and test your application in the browser (by default the address is http://localhost:8080
). GoLand automatically opens the App Engine tab in the Run pane with the output of the GAE application server. For a debugging session, put a breakpoint, press ^D / Shift+F9 or click the Debug button, and then open the application in the browser. This action will open the Console tab with the output in the Debug pane. The Debugger tab will show all the necessary debugging information and available actions.
Support for Testify
Support for the Testify test framework is available! GoLand now lets you run suites and methods as regular test functions right from the editor.
For your convenience, the output pane of the Test Runner tab offers a link that opens the Comparison Failure window, which can help explore the diff between the expected and actual values for failed assertions.
Complete current statement
Complete Current Statement expands its responsibility and can now insert the required trailing comma automatically in any composite literals (such as struct, slice, etc.). It gets you in a position where you can start typing the next statement. To invoke this neat action, press ⌘⇧↩ on Mac or Ctrl + Shift + Enter on Windows or select Edit | Complete Current Statement from the main menu.
Generate any test action via the Generate popup menu
The actions Empty test file, Test for function, Tests for file, and Tests for package are now available via the Generate popup menu! Press Ctrl+N on Windows or ⌘N on Mac inside a function, choose any test action you need, and the IDE will automatically create it for you.
Even more changes
- Faster indexing of Go SDK 1.11.
- Docker, Markdown and Deployments plugins are bundled by default.
- Improved formatting of Go Templates.
Important bug-fixes
— GO-6177 — Remote debugging of apps built with Go Modules works as expected.
— GO-4700 , GO-5730 , GO-6064 — Fixed several issues affecting SQL injection highlighting.
— GO-5939 — The IDE now warns you about usages of ambiguous method declarations.
— GO-5090 , GO-5263 , GO-5759 — refactorings and Intention Actions don’t remove comments any more.
And even that’s not all for this first EAP build – we have more! Stay tuned for another post later this week which will cover improvements in VCS, Docker, Kubernetes plugin, JavaScript and TypeScript Worlds, and more.