GoLand
 
Get GoLand
You are viewing the documentation for an earlier version of GoLand.

Change signature

Last modified: 12 December 2022

Shortcut for the action: Ctrl+F6

General refactoring settings: Settings/Preferences | Editor | General

refactoring is available

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.