Go workspaces

Last modified: 03 April 2025

Go workspaces help you manage multiple modules within a single project. When you create a go.work file, Go reads the list of modules defined in the workspace and generates a unified list of dependencies. If any go.mod files include replace directives, they are also taken into account. This combined dependency list is then applied to all modules in the workspace.

When you create a go.work file, IntelliJ IDEA automatically includes all modules in the current project.

You can also generate a go.work file from an existing go.mod file if it contains replace directives.