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/doc: show Bugs section #33970
Comments
Technically this is not a feature. The old godoc had bug listing on the command line. |
Right. But |
I assume that @ianthehat or @dmitshur have some ideas here, since I undesrtand they plan on sharing more code between similar tools like |
The old go doc als listed bugs correctly @agnivade. I see now how my description is a bit misleading. This is a bug, or maybe an undocumented feature los. 😏 |
Are you positive? If so, can you reproduce that with a specific old version of Go? For example, see https://godoc.org/golang.org/dl, or the Docker images. |
Yes, version 1.11 of |
It already mostly does this. Try 'go doc strings
If you are asking that the bug information be shown always, I disagree, as What it does not do is show the bug if you explicitly ask about |
Aha ! It shows it as part of the function itself. I was searching for a separate section like @robpike - Do you think it makes sense to move all |
The strings package example has a BUG comment embedded into the function comment block. In that case
So it turns out there are
How to proceed? Shall I split this issue up into separate reports? |
Bit of a rabbit hole. Do we include a function body and all of its functions invoked? 😅 Also, doc.reader clears the Body of each ast.FuncDecl now to save some memory, so the location information is lost. |
Change https://go.dev/cl/511935 mentions this issue: |
The new
go doc
does not show documented bugs conform the convention.For example,
go doc -all godoc.org/pascaldekloe/jwt | grep -i bug
has no results. The HTML representation catches the comments correctly at https://godoc.org/github.com/pascaldekloe/jwt#pkg-note-bug .Bugs are an essential part of the documentation.
go doc -all
should have a bugs section (like godoc(8) does)go doc <selection>
should include the relevant bugs for the respective selectionThe text was updated successfully, but these errors were encountered: