# Read-only files

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/llms.txt).

If a file is read-only, it is marked with the closed lock icon ![the Locked icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.locked.svg) in the [status bar](https://www.jetbrains.com/help/go/guided-tour-around-the-user-interface.html.md#read_only_widget). If a file is writable, it is marked with the open lock icon ![the Unlocked icon](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.unlocked.svg).

<a id="enable-disable-read-only"></a>

Procedure: Toggle read-only mode on and off

* Open a file in the editor and click the lock icon ![the Locked icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.locked.svg) / ![the Unlocked icon](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.unlocked.svg) in the [status bar](https://www.jetbrains.com/help/go/guided-tour-around-the-user-interface.html.md#status-bar).

* Alternatively, select a file in the Project tool window ([ActivateProjectToolWindow shortcut](https://www.jetbrains.com/help/go/llms-keymap-index.md "ActivateProjectToolWindow")), go to `File | File Properties` in the main menu and click Make file read-only.

Files can be read-only in certain cases. In these cases, clicking the ![the Locked icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.locked.svg) / ![the Unlocked icon](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.unlocked.svg) icon the status bar will not make the file writable.

* The file is a decompiled class. Complied classes are normally read-only in GoLand.

* The read-only status is set by a version control system. For example, the file can be locked by Subversion. In this case, use GoLand version control integration features to make the file writable.

* The file size exceeds 2.5 MB. Such files are considered too large for editing.

* Library files in GoLand are normally read-only by default as the code from them should be used as is. For such files, you will not see the lock icon in the status bar. GoLand applies [Reader mode](https://www.jetbrains.com/help/go/reader-mode.html.md) to library files by default.

* The file does not belong to the project. In this case, the [Non-Project Files Protection](https://www.jetbrains.com/help/go/non-project-files-access-dialog.html.md) dialog appears, prompting you to select an action.

* The file belongs to the generated sources ![](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.nodes.generatedSource.svg) or generated test sources ![](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.nodes.generatedTestRoot.svg) root. Files in these folders are usually read-only as they are generated automatically rather than written manually and can be regenerated.

* The file may be marked as read-only in your operating system. To check this status, you can inspect file attributes on Windows or permissions on Unix-based systems like Linux or macOS.

## See also

### Related

[Reader mode](https://www.jetbrains.com/help/go/reader-mode.html.md)

