The documentation of go list -m currently says:
"If no arguments are specified, the main module is listed."
This is incorrect, since, when workspace mode is enabled, go list -m lists all the active main modules.
Here is an example:
$ go list -m -json
{
"Path": "xxx",
"Main": true,
"Dir": "/tmp/src/xxx",
"GoMod": "/tmp/src/xxx/go.mod",
"GoVersion": "1.18"
}
{
"Path": "yyy",
"Main": true,
"Dir": "/tmp/src/yyy",
"GoMod": "/tmp/src/yyy/go.mod",
"GoVersion": "1.18"
}
{
"Path": "zzz",
"Main": true,
"Dir": "/tmp/src/zzz",
"GoMod": "/tmp/src/zzz/go.mod",
"GoVersion": "1.18"
}
The documentation of
go list -mcurrently says:"If no arguments are specified, the main module is listed."
This is incorrect, since, when workspace mode is enabled,
go list -mlists all the active main modules.Here is an example:
$ go list -m -json