GoLand 2024.3 Help

Content root

In GoLand, content is a collection of files with which you are currently working, possibly organized in a hierarchy of subfolders. The folder that is the highest in this hierarchy is called the content root folder or content root (shown as the Content root icon) for short. A project has at least one content root folder, which by default is the project folder itself.

Having several content roots enables you to work with files from several directories that do not have a common immediate parent. This is helpful when you use static contents, for example, icons. You can just save them all in a folder and then specify this folder as an extra content root in several projects.

Content root types

By default, all the files in a content root folder are involved in indexing, searching, parsing, code completion, and so on. To change this status, folders within a content root can be assigned to the following categories:

  • the Excluded root icon Excluded

    These excluded categories contain files and folders ignored by GoLand when indexing, searching, parsing, watching and so on.

    Usually, one would like to exclude temporary build folders, generated output, logs, and other project output. Excluding the unnecessary paths is a good way to significantly improve performance.

  •   Resource Root

    These roots are intended for resource files in your application (images, style sheets, and so on). Files and subfolders in a Resource Root folder can be referenced relative to this folder instead of specifying full paths to them.

Mark directories in the Project tool window

  1. Right-click the desired directory in the Project tool window.

  2. From the context menu, point to Mark Directory As node.

  3. Choose Mark as <directory status>.

Last modified: 11 October 2024