Skip to content

x/website: update go list -m documentation for workspace mode in ref/mod #52649

@perillo

Description

@perillo

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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.website

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions