# Go workspaces

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.

Procedure: Create a workspace

* Right-click the parent directory of your project. Then select `New | Go Workspace File`.

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

Procedure: Merge several use directives into one directive

* Click a `use` directive, press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Alt+Enter` (NetBeans), `Alt+Enter` (Visual Studio), `⌥ ⏎` (Visual Studio (macOS)), `Ctrl+1` (Eclipse), `⌘ 1` (Eclipse (macOS)), and select Merge multiple 'use' directives into one.

