Inspectopedia Help

Migration to Go workspace is possible

Generates '' files using 'replace' directives.

Go workspaces is a feature introduced in Go 1.18 that allows working simultaneously on several modules.

Workspaces are a modern alternative to 'replace' directives pointing to local directories.

All modules in a workspace have the same set of dependencies, thus making the configuration simpler, more robust, and requiring fewer 'go list' calls to scan the project structure.

The fix for this inspection generates a new '' file and does not change existing files.

By default, the 'warning' severity is used. If a generated workspace would include Go modules that were not replaced in the original 'go.mod', no warning is shown due to possible side effects caused by migration. But you can still run the fix manually.

For more information about workspaces, refer to Go Modules Reference.

For Go workspaces introduction, refer to Tutorial: Getting started with multi-module workspaces.

Locating this inspection


Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | Go modules | General


By default bundled with

GoLand 2024.1, Qodana for Go 2024.1,

Can be installed with plugin


Last modified: 18 June 2024