golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.22k stars 17.57k forks source link

x/tools/cmd/eg: needs package documentation #10257

Open crawshaw opened 9 years ago

crawshaw commented 9 years ago

I pointed someone to https://golang.org/x/tools/cmd/eg, which unhelpfully says "For documentation, run the command , or see Help in golang.org/x/tools/refactor/eg". The command cannot be run on mobile, so they following the unclickable link (with some effort) to discover a Help that is not helpful:

const Help = "" /* 4235 byte string literal not displayed */

Please consider using the technique adopted by the Go tool for package documentation: it is generated from help output.

https://github.com/golang/go/blob/master/src/cmd/go/mkdoc.sh

minux commented 9 years ago

I think godoc.org should still allow the user to see the long string literal even though it won't be shown by default.

crawshaw commented 9 years ago

That's really a separate bug though. Package documentation would be a lot nicer out of a string.

lbordowitz commented 5 months ago

Is this issue still relevant?

adonovan commented 5 months ago

Well, the documentation of cmd/eg is still not good, so yes, it is relevant, but command itself has been neglected for many years, and if we ever try to bring it up to date (for example, to fully support go1.15 modules), it will likely be in the context of gopls; but it is not one of the many refactorings that we are prioritizing this year. So it is unlikely to be fixed soon, or ever.