GoLand 2018.1 Help

Move and Copy refactorings

The Copy refactoring lets you create a copy of a file, directory or a package in a different directory or a package.

Perform copy refactoring

  1. Select an item you want to refactor. (For example, class in the editor or file in the Project tool window.
  2. Select Refactor | Copy (F5)
  3. In the dialog that opens, specify the name and location for your copy, and click OK.

The Move refactoring lets you move a top-level member to another file. It also lets you move a file or a folder in the Project tool window.

Perform move refactoring

  1. Select an item you want to move.
  2. Select Refactor | Move (F6).
  3. If you are trying to move a function to another file, in the dialog that opens specify a name of the file.
    go move function
    If you are trying to move file or package in the dialog that opens, specify a path to the target directory.
    go move file
    Click OK.
Last modified: 25 July 2018