GoLand 2019.2

Adds support for escape sequences in string literals.
July 26, 2019
New Version

Features

Function calls support

  • Examine in detail what is going on inside your expression at any specific point in your program’s execution. Note, that this feature relies on the experimental function call support feature from Delve and the Go Runtime.

Improved Default & Darcula color schemes

  • GoLand 2019.2 adds variety to the semantic code highlighting in the Default and Darcula color schemes. This will help you better understand your code and follow its logic faster. Easily distinguish package names from variables, built-in code constructions from your own ones, and type conversions from function calls. Methods’ receivers and functions/function calls now have their own colors, too.

Debugger updates

  • More info about variables with String() method - The debugger now shows the results of simple String(), Error(), and DebugString() method implementations in the Variables pane. It supports methods with a single return statement without calls.
  • Better presentation of special types - GoLand 2019.2 displays the value of struct derived from time.Time, time.Duration and net.IP types in a human-readable format in the debugger’s Variables pane.
  • Default format for integers - Choose how to display integer variables in the debugger by default: in binary, decimal, or hex format. Set the format in Settings/Preferences | Build, Execution, Deployment | Debugger | Data Views | Go.

Support for Go 1.13 features

  • GoLand 2019.2 supports number literals and signed integers as shift counts. These changes are related to the steps towards Go 2.
  • GoLand’s code highlighting will alert you to any mistakes, and it will correctly show you the output in the Console.

Custom Postfix Completion templates

  • GoLand 2019.2 lets you create your own custom Postfix Completion templates.
  • Navigate to Settings/Preferences | Editor | General | Postfix Completion, click +, select Go, define your template, and choose the scopes where the template will be applicable.
  • In addition, you can find new predefined Postfix Completion template - .aappend. It prepends an expression with a built-in append function call and assigns its result to this expression.

Quick-fixes based on Change Signature

  • Added many quick-fixes based on the Change Signature refactoring. For example, with the simple press of Alt+Enter, you can automatically infer and add a parameter to the function call, or add missing return parameters in a signature.

Extract Method refactoring with returns

  • The Extract Method refactoring now handles code with return statements. If the code always exits via returns, it will be extracted as is. However, if it contains execution paths without returns, the extracted method will have an additional boolean flag as a return value. The flag will be used to perform an early return on the call side.

Code Completion improvements

  • Code completion now provides suggestions for receiver members even if there’s no receiver. Receiver names like this or self are discouraged. As a result methods have different receiver names. This code completion feature allows you to ignore the difference.

Cleverer Go Modules and dep integration

  • GoLand 2019.2 enables Go Modules/dep integration automatically when it detects that a project uses Go Modules or dep. Previously, it disabled GOPATH indexing and showed only a notification about enabling Go Modules/dep integration. This was not enough though, because it was easy to miss or ignore the notification and thus get a project in a semi-configured state.

Code inspections

  • Redundant type conversions - A code inspection called Redundant type conversions helps you keep your project more readable and neat. It warns you about redundant type conversions that can be omitted.
  • Validation of slice indices in literals - Added validation of slice indices in composite literals. This means that the editor will warn you that your index must be a non-negative integer constant before you compile your project.

Code Editing

  • Support for escape sequences - Support for escape sequences in string literals is fully equipped with:
    • Code highlighting.
    • An inspection that will warn you about potential problems.
    • Smart editing that understands the location of escape sequences.
    • More precise spell-checking.
  • Also, formatting placeholders are now highlighted in a different color so you can more easily spot them in long strings. You can customize the color via Settings/Preferences | Editor | Color Scheme | Language Defaults | String | Escape Sequence | Valid. Or, for Go only, go to Settings/Preferences | Editor | Color Scheme | Go | String | Valid escape.
  • Fill Fields action - It is now easier to fill the fields of structs. First, you can choose which fields you want to fill in a dedicated window. Second, generated values can now be edited. Finally, this action is now available via Code Completion.
  • Improved Extend Selection - Extend Selection now extends the code in a semantically correct way, from a line to a block of code separated by empty lines (instead of selecting the whole method body).

UI enhancements

  • Fresh look for New | File dialog - The New | File dialog has been turned into a popup with a list of all the possible options for a particular file type to create. Previously, you had to expand the list to choose an alternative, but now all the available options are immediately visible.
  • Improved Plugins page - Now GoLand shows the plugin details right away, without any need to open the plugin’s detail pages one by one. Added more options under the gear icon, so you can disable or enable all the downloaded plugins all at once. The Update button is now placed near the plugin name in the Installed tab. The Updates tab is gone as it isn’t necessary anymore.
  • Tidy Find tool window - In the Find tool window, it has grouped together some rarely used icons and removed others altogether.

Handy general changes

  • More Scope chooser options - New scopes such as Recently Changed and Recently Viewed Files, Files in Previous Search Result, and Selection are all now added to the Scope chooser. You will also be able to select the Data Sources scopes. In addition to this, it's added an ability to select a scope for Rename refactoring. Double press Shift+F6 to invoke the Rename refactoring window, and choose the scopes where the renaming will be performed.
  • New option to control caret movement - The default behavior of the Move Caret to Next Word action in GoLand 2019.2 has changed: the IDE now moves the caret to the end of the current word. However, you can adjust it as you see fit. Go to Settings/Preferences/Settings | Editor | General and select where the IDE should place the caret: at the end of the word, at the beginning of the next word, or even between both boundaries.
  • More info in the Project View - Toggle In-place Descriptions under the View menu to get a preview of the file size, and date and time modifications in the Project View.

Version control improvements

  • Commit from the Local Changes - GoLand 2019.2 provides a way to commit directly from the Local Changes. Now while working on a commit, you can browse through the source code, view the history for a specific file, view the diff for the file in the same area as the commit, or use the other features of the IDE. To enable this functionality and commit from the Local Changes without a dialog, go to Settings/Preferences | Version Control | Commit Dialog and select the checkbox Commit from the Local Changes without showing a dialog.
  • Improvements for .gitignore files - GoLand correctly highlights all the ignored files and offers code completion suggestions for file and folder name. You can now quickly add a file to .gitignore using the context menu from the Local Changes tab of the VCS tool window: right-click it in the Unversioned files group and select Add to .gitignore.
  • Abort Merge option - Added an Abort Merge option that will be available in the Branches popup when there is an ongoing merge. This is the future many of us have dreamed of, where you don’t need to switch to the terminal anymore to abort things.
  • Customizable VCS Log columns - Click on the eye icon to choose the columns to display in the Log tab, select the Show Columns item from the context menu and choose the columns you want to see: Author, Date, or Hash.

Tools

  • Shell Script support - GoLand 2019.2 provides support for shell scripts, including word and path completion, Quick documentation preview, and even text-based rename. On top of that, it's added integrations with Shellcheck, and shfmt.
  • Kustomize support for Kubernetes - With the Kubernetes plugin, GoLand 2019.2 provides editing support, code completion for keys and paths, many inspections, and the Rename refactoring. It will also let you navigate from a declared path to the associated packages or files in the project view for Kustomize resource files.
  • Browser for Docker container file system - Now you can view the file system of the running Docker container. The file system is displayed in the File tab of the Docker node in the Services tool window.

Web development

  • Smart intentions for JavaScript and TypeScript - With the new Propagate to destructuring declaration intention, you can replace an extra variable if it’s possible with another destructuring. To remove a destructuring completely, use the intention action called Replace destructuring with property or index access. The IDE will now warn you if a boolean expression in a condition has some unnecessary parts and will suggest simplifying it.
  • Improved Rename refactoring for JavaScript - When you rename a symbol in a JavaScript or TypeScript file, the IDE now groups together dynamic usages and, by default, excludes them from the refactoring. This makes the refactoring more accurate and gives you more control over what exactly should be renamed in the Refactoring Preview tool window.
  • Improved support for Vue.js - Using Vuetify or BootstrapVue in your Vue.js application? Code completion for components and their props from these and some other Vue component libraries is now more precise. This was made possible by a new approach to working with these libraries in the IDE.
Function calls support

GoLand

A cross-platform IDE built specially for Go developers.

GoLand is also available in:

Got a Question?

Live Chat with our JetBrains licensing specialists now.