Migration to Go workspace is possible
Generates 'go.work' 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 'go.work' 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
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
VgoMigrateFromReplacesToWorkspace- 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.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Go, 243.23131 |