cmd/go: go list -m error is confusing when go.mod lacks module directive #37264
Labels
FrozenDueToAge
GoCommand
cmd/go
modules
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Inside the
HOME
directory:But if I add a
go.mod
file in a parent directory:This is confusing for two reasons:
HOME
directory is also outside `GOPATHgo list -m
returns the usage message forgo mod init
, and this may confuse newcomersThe text was updated successfully, but these errors were encountered: