Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: go help mod prints unclear error message on bad mod subcommand #33153

Closed
ALTree opened this issue Jul 17, 2019 · 2 comments
Closed

cmd/go: go help mod prints unclear error message on bad mod subcommand #33153

ALTree opened this issue Jul 17, 2019 · 2 comments
Labels
Milestone

Comments

@ALTree
Copy link
Member

@ALTree ALTree commented Jul 17, 2019

$ go version
go version devel +0cadf40f4c Tue Jul 16 22:31:35 2019 +0000 windows/amd64

go help mod prints:

Go mod provides access to operations on modules.

[...]

Use "go help mod <command>" for more information about a command.

go help mod <command> works as advertised, except when <command> is not a valid mod command; in that case this bizarre error message is printed:

$ go help mod bad
go help mod bad: unknown help topic. Run ' mod'.

It's not clear what it means by Run ' mod', but it doesn't look right.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jul 23, 2019

Change https://golang.org/cl/187217 mentions this issue: cmd/go: Fix the suggested command on the help error message

@jmartin82

This comment has been minimized.

Copy link
Contributor

@jmartin82 jmartin82 commented Jul 23, 2019

Hi,

This issue is not only affecting mod subcommands, but it's also affecting all of them.

For example:

go help vet a

go help vet a: unknown help topic. Run ' vet'.

I've added a CL with the fix.

@gopherbot gopherbot closed this in 68e2899 Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.