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
x/tools/godoc: Remove the function declaration link #20269
Comments
CL https://golang.org/cl/42892 mentions this issue. |
I've investigated this. This issue is actually 2 issues, and the correct fix is different from what's suggested above. One is a deploy/release issue (what's running at golang.org), and the other is a code issue in latest master of tools subrepo. Both need to be resolved. The version of cmd/godoc that's running at http://golang.org/pkg/ is weird. I can't easily tell what version exactly it is, but I can tell it's not the version that's a part of go1.8.1 release (which didn't have this bug), and it's not the latest master of tools subrepo (which has this bug, but the fix is different from what the issue suggests). So, I'm going to ignore it below and discuss what I can reproduce locally with latest master version of cmd/godoc in tools subrepo. This bug was actually introduced in golang/tools@e1bdc76 (similar to #19894 (comment)). /cc @jayconrod With the parent commit (golang/tools@00f7cd5), the generated HTML looked like this: With golang/tools@e1bdc76, it becomes: Notice that the So, the correct fix is to remove the link, not to fix the URL. The link wasn't meant to be added, it was an unintentional regression caused by golang/tools@e1bdc76. Its commit message confirms it was meant to be a fix for composite literals anchors only. (The link doesn't make sense in this context, because it points to the same location as the function/method. There's already a heading that does that too. That's why it should be removed.) |
Thank you so much for review! |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
I referred to the following documents.
https://golang.org/pkg/net/http/#Client.Get
https://golang.org/pkg/net/http/#Header.Get
What did you expect to see?
The Fragment link should be as follows.
What did you see instead?
The function name link of the part displaying the signature of the method is invalid.
The text was updated successfully, but these errors were encountered: