# Change signature

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/2026.3/llms.txt).

The Change Signature refactoring combines several different modifications that can be applied to a function, method, or a method specification. You can use this refactoring to:

* change the method/function name

* add, remove, and reorder parameters

* assign default values to new non-variadic parameters

When changing a method/function signature, GoLand searches for all usages of the method/function and updates all the calls, implementations, and override replacements of the method/function that can be safely modified to reflect the change.  When you refactor a method specification, you will see a notification dialog where you can select to update all implementations as well.

Procedure: Change a method or function signature

1. Click a method/function name that you want to refactor.

2. Press `Ctrl+F6` (Windows), `⌘ F6` (macOS), `⌘ F6` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ S` (macOS System Shortcuts), `Ctrl+F6` (XWin), `Ctrl+F6` (GNOME), `Ctrl+6` (KDE), `Ctrl+F6` (Emacs), `Ctrl+F6` (Sublime Text), `Ctrl+F6` (Sublime Text (macOS)), `Ctrl+F6` (VSCode), `⌘ F6` (VSCode (macOS)). Alternatively, select `Refactor | Change Signature` from the main menu or from the context menu.

3. In the Change Signature dialog, make the necessary changes to the method/function signature depending on your needs:

* Change the method/function name. To change the name, edit the text in the Name field.

* Manage the method/function parameters. To configure the parameters, use the table and the buttons in the Parameters area: * To add a new parameter, click ![The Add button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg) and specify the properties of the new parameter in the corresponding table row. * To remove a parameter, select any row and click ![The Remove button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.remove.svg). * To reorder the parameters, use the Up (![The Up icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.up.svg)) and Down (![The down icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.down.svg)) icons. * Reuse types simplifies the process of declaring multiple variables of the same type. When you enable this option, the IDE automatically groups variables of the same type together in your declaration. For example, instead of `firstName string, lastName string, age int, id int`, the IDE will transform the code to `firstName, lastName string, age, id int`. * Use Name to change a parameter name. For a new parameter, enter an expression in Default value. GoLand inserts this expression as an argument at existing call sites. If you leave the field empty, GoLand inserts the zero value for the parameter type, such as `0` for `int` or `""` for `string`. This does not add a default parameter value to the Go function declaration.

4. Click Refactor.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/go_change_a_method_or_function_signature.mp4)

> **Tip:**
> To [see the expected changes](find-tool-window.html) and make adjustments prior to the refactoring, click Preview.

Procedure: Add a return value

1. Click the function name and press `Ctrl+F6` (Windows), `⌘ F6` (macOS), `⌘ F6` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ S` (macOS System Shortcuts), `Ctrl+F6` (XWin), `Ctrl+F6` (GNOME), `Ctrl+6` (KDE), `Ctrl+F6` (Emacs), `Ctrl+F6` (Sublime Text), `Ctrl+F6` (Sublime Text (macOS)), `Ctrl+F6` (VSCode), `⌘ F6` (VSCode (macOS)). Alternatively, select `Refactor | Change Signature` from the main menu or from the context menu.

2. In the Change Signature dialog, click the Result parameters tab and click the Add icon (![The Add icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg)).

3. In the Type text field, specify the return type, for example, `error`.

4. Click Refactor.

![Change signature animation](https://resources.jetbrains.com/help/img/idea/2026.3/go_add_return_value.png)

Procedure: Add parameters

1. Click the `return` value that is highlighted in red color.

2. Press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Ctrl+.` (VSCode), `⌘ .` (VSCode (macOS)) and select Create parameter '<parameter_name>'.

3. In the Change Signature dialog, adjust parameter settings or accept suggested settings.

4. Click Refactor.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/go_add_parameters.mp4)

## Productivity tips

Procedure: Add missing parameters

Click a parameter in the signature, press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Ctrl+.` (VSCode), `⌘ .` (VSCode (macOS)) and select the Change signature refactoring. See the `demo1.go` file in [the GitHub repository](https://github.com/apronichev/documentation-code-examples/blob/master/changeSignature/demo1.go).

![Add missing parameters](https://resources.jetbrains.com/help/img/idea/2026.3/go_change_signature_add_missing_parameters.png)

Procedure: Change the parameter type

Click a parameter in the signature, press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Ctrl+.` (VSCode), `⌘ .` (VSCode (macOS)) and select the Change signature refactoring. See the `demo1.go` file in [the GitHub repository](https://github.com/apronichev/documentation-code-examples/blob/master/changeSignature/demo1.go).

![Change the parameter type](https://resources.jetbrains.com/help/img/idea/2026.3/go_change_signature_change_parameter_type.png)

Procedure: Change function parameters

You can automatically infer and add a parameter to the function call or add missing return parameters in a signature.

![Change function parameters](https://resources.jetbrains.com/help/img/idea/2026.3/go_change_function_parameters.png)

## Change signature dialog

The Change Signature refactoring combines several different modifications that can be applied to a function, method, or a method specification. You can use this refactoring to:

* change the method/function name

* add, remove, and reorder parameters

* assign default values to new non-variadic parameters

When changing a method/function signature, GoLand searches for all usages of the method/function and updates all the calls, implementations, and override replacements of the method/function that can be safely modified to reflect the change.  When you refactor a method specification, you will see a notification dialog where you can select to update all implementations as well.

| Item | Description |
| --- | --- |
|  Name | Name of a function, method, or a method specification. |
|  Parameters |    List of parameters in the signature. In the Parameters field, you can perform the following actions with parameters:        * Add ![The Add icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg): Adds a new parameter. You can specify properties of the new parameter in the corresponding table row (a name, type, and a default value).    * Remove ![The Remove icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.remove.svg): Removes a parameter.    * Up ![The Up icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.moveUp.svg) and Down ![The Down icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.moveDown.svg) icons: Reorders parameters.    |
|  Result parameters | Returned or result parameters of a Go function. You can specify properties of the new parameter in the corresponding table row (a name, type, and a default value).  |

## See also

