In GoLand, a project helps you to organize your source code, tests, packages, build instructions, and your personal settings in a single unit.
Switch between projects
If you have several opened projects at the same time, you can switch between them using the following options:
Switch to the next project window: Ctrl+Alt+] ()
Switch to the previous project window: Ctrl+Alt+[ ()
Alternatively, open the Window menu and select the project to which you want to switch.
In GoLand, there are two types of formats in which a project's configuration can be stored — the file-based format and the directory-based format.
The file-based format was the only one available in older versions of GoLand; now it is outdated. Projects in this format contain several files: the .ipr, .iws, and .iml files. Generally, we don't recommend using this format unless you need to open projects in different file managers by clicking the .ipr file, or unless you need to store multiple projects in one directory.
For the directory-based format, the IDE creates the .iml file and the .idea directory that keeps project settings. It's the default format for projects in GoLand at this moment.
This format was introduced after the file-based format. Its main advantage is that it's adjusted to store project files in Version Control Systems: the project data is split over multiple files, and merge conflicts are less likely. For more information on how to share projects in different formats, refer to How to manage projects under Version Control Systems
Change the project format to directory-based
From the main menu, select.
Change project location
Move a project to another location
In the Project tool window Alt+1, right-click the root directory of your project and select (F6).
In the dialog that opens, specify a new location for the project and click Refactor.
Change the default location for projects
In the Settings/Preferences dialog Ctrl+Alt+S, select .
In the Default directory field, specify the path to the folder in which you want to store your projects.
Apply the changes and close the dialog.
Share project settings through VCS
List of non-shareable configuration files
GoLand identifies configuration files and adds them to the list of ignored files automatically. However, if you are sharing your project manually, we recommend that you avoid placing these files and folders under version control:
For the full list of files, refer to How to manage projects under Version Control Systems and JetBrains.gitignore.
Copy global settings to the project level
In this section:
GoLand caches a great number of files, therefore the system cache may become overloaded. Sometimes the caches will never be needed again, for example, if you work with frequent short-term projects.
When you invalidate the cache, GoLand rebuilds all projects ever run in the current version of the IDE.
Clear the system cache
From the main menu, select.
In the Invalidate Caches dialog, select an action. You can invalidate the caches and restart the IDE, invalidate the caches without restarting the IDE, or just restart the IDE.