GoLand
 
Get GoLand

Go workspaces

Last modified: 11 October 2024

Go workspaces help you to work with several modules in your project. When you create a go.work file, Go runs through the list of modules listed in the workspace, and creates a single list of dependencies. If go.mod files have replace directives, Go will also take them into account. A generated single dependency list is applied to all the modules listed in the workspace.

When you create a go.work file, GoLand automatically adds all the modules in the project.

Go workspaces

Also, you can now generate go.work from go.mod if you have replace directives there.