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: clarify that 'go list' without arguments lists the package in the current directory #32707
Comments
Thanks for reporting. I think this behavior is documented in the current version of Go.
It says that
Further below:
What do you think? |
All the program outputs you've quoted match with those from my version. This all seems very logical now that you've explained it, but I don't think a beginner gopher would figure it out. Personally, I gave up on the help file when reading the struct for errors in the middle of I wish I was wondering if it were possible to show the command ran above it's output in the help file. Below are the first lines of go help list:
If there was a command specified above the output (would that be |
All of the go help topics are on one page at https://golang.org/cmd/go/. By now, that page has grown to be very large, and it serves well as a reference, but not something that's a great starting point for beginners on day 1. We're planning to improve that by creating better-organized documentation that serves as a guide (/cc @rsc), and I hope that work will address this issue you've raised. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Probably
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I read the output of
go help
aboutgo list
, saying it willlist packages
. I rango list
What did you expect to see?
I was expecting to see the list of go packages in my
$GOPATH
and$GOROOT
, combined. Something akin to the output ofpython3 -c 'help("modules")'
.What did you see instead?
can't load package: package .: no Go files in /home/pshem
Enchancement request
go help
, in the section forgo list
, should specify that only go packages in the current/specified directory will be listed. Given #17027, I'm not the only person confused by the current description ofgo list
The text was updated successfully, but these errors were encountered: