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.
If you encounter any bugs or issues with function calls support, please report them to our issue tracker.
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.
As usual, change everything to your taste in Settings/Preferences | Editor | Color Scheme.
The debugger now shows the results of simple
DebugString() method implementations in the Variables pane. It supports methods with a single return statement without calls.
GoLand 2019.2 displays the value of struct derived from
time.Duration and net.IP types in a human-readable format in the debugger’s Variables pane.
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.
GoLand 2019.2 supports number literals and signed integers as shift counts. These changes are related to the steps we’re making towards Go 2. Head to the official Go blog to learn more.
GoLand’s code highlighting will alert you to any mistakes, and it will correctly show you the output in the Console.
Read this article to learn more about the new Go 1.13 features and how GoLand 2019.2 supports them.
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.
To learn more about creating custom templates, see this article.
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.
We have 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.
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 now provides suggestions for receiver members even if there’s no receiver. Receiver names like
self are discouraged. As a result methods have different receiver names. This code completion feature allows you to ignore the difference.
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. We noticed that was not enough though, because it was easy to miss or ignore the notification and thus get a project in a semi-configured state.
If this doesn’t work for you, you can disable the integration manually in Settings/Preferences | Go | Go Modules (vgo) at any time.
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.
We’ve 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.
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.
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.
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).
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.
Now GoLand shows the plugin details right away, without any need to open the plugin’s detail pages one by one. We’ve 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.
In the Find tool window, we have grouped together some rarely used icons and removed others altogether.
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, we’ve 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.
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.
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.
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.
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.
We've 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.
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.
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.
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.
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.
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 we’ve adopted to work with these libraries in the IDE.