GoLand 2019.3 Help

Inline Dialogs

Refactor | Inline
<context menu of a selection>| Refactor | Inline

Inline Variable dialog

The Inline Variable refactoring allows you to replace a redundant variable with its value.

To access the Inline Variable dialog box through a menu item or the keyboard shortcut, position the cursor at the variable to be inlined.

The inline refactoring turns the following two variables:

name := person.Name data := getData (name)


data := getData (person.Name)

Also, all occurrences of the name variable is replaced with person.Name.

Last modified: 23 March 2020