Proposals Unofficial Go proposal tracker

Disallow the bare ... package pattern in module mode

#78387 · cmd/go · low impact · Accepted ·

In module mode, go list ... tries to list every package in every module in the build list. To do that, it must resolve dependencies that the build doesn't need. Those dependencies aren't requirements of the main module, so the command usually fails with a confusing error. It almost never does what users expect.

The go command will now return an error for the bare ... pattern in module mode. The error suggests ./... or work, which is usually what users want. Patterns that combine ... with other components, such as example.com/foo/..., still work because the extra components limit the search.

go list -m ... is not affected.

Proposal
#78387 by matloob
Status
Accepted on May 27, 2026
Impact
low
Area
cmd/go