GoLand
 
Get GoLand

Using the rename refactoring

Last modified: 26 May 2024

The Rename refactoring lets you change names of symbols, files and all the references to them throughout the code.

Renaming local variables or private methods can be done easily inline since only the limited scope is affected. Renaming types, interfaces, or public methods could potentially impact a lot of files. In this case, preview potential changes before you refactor.

You can copy the following code snippet to your editor and try to rename the Position field to JobTitle. Use the previous procedure for clues about shortcuts.