GoLand 2020.1 Help

Path Variables

File | Settings | Appearance & Behavior | Path Variables for Windows and Linux
GoLand | Preferences | Appearance & Behavior | Path Variables for macOS
Ctrl+Alt+S the Settings/Preferences icon

On this page:

Path Variables page

ItemDescription
ResetRevert path variables and the list of ignored variables to their initial saved states.
NameThis field shows the name of a path variable (readonly).
ValueThis field shows the value of a path variable (readonly).
the Add button or Alt+InsertCreate a new path variable.
the Edit button or EnterEdit the selected path variable.
the Remove button or Alt+DeleteDelete the selected path variable.
Ignored Variables List the names of the variables that should be ignored. Use semicolons ; to separate the list items.

Add / Edit Variable dialog

ItemDescription
NameSpecify the path variable name.
ValueSpecify the path variable value. Use the Browse button  Shift+Enter to select the necessary file or folder in the Select Path dialog.

Example: creating a new path variable

You may have a library that is located outside your project directory. This library is attached to your project, and the path to this library is included in the .iml file of your project. However, this path should not be absolute, because the location on this library may be different on your teammates' computers. In this case, you can create the PATH_TO_LIB variable:

  1. In the Settings/Preferences dialog Ctrl+Alt+S, go to Appearance & Behavior | Path Variables, and click the Add button.

  2. In the Add Variable dialog, type the PATH_TO_LIB variable, and its value that points to the library location on your disk.

  3. Share the .iml file through your version control system.

  4. After your teammates update their projects from VCS, they will change the PATH_TO_LIB variable value so that it points to the library location on their computers.

Last modified: 18 July 2020