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

x/tools/godoc: struct field anchor is added to wrong location when another field comment above it has same prefix #37041

Closed
c-yan opened this issue Feb 5, 2020 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@c-yan
Copy link

c-yan commented Feb 5, 2020

Certificate.Leaf is linked to Certificate.PrivateKey instead of the location in the Certificate.Leaf field.

@odeke-em
Copy link
Member

odeke-em commented Feb 5, 2020

Thank you for this report @c-yan!

Kindly paging @katiehockman @FiloSottile.

@odeke-em odeke-em added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 5, 2020
@odeke-em odeke-em added this to the Backlog milestone Feb 5, 2020
@FiloSottile FiloSottile changed the title crypto/tls: Certificate.Leaf is not linked correctly x/tools/cmd/godoc: Certificate.Leaf anchor is incorrect Feb 5, 2020
@FiloSottile
Copy link
Contributor

Hah, it's because there's a documentation line that starts with Leaf in the PrivateKey docs.

This is an x/tools/cmd/godoc bug.

/cc @dmitshur

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Feb 5, 2020
@dmitshur
Copy link
Contributor

dmitshur commented Feb 6, 2020

Good analysis @FiloSottile.

As an observation, this bug is not present in the documentation rendering algorithm used by pkg.go.dev:

https://pkg.go.dev/crypto/tls/#Certificate.Leaf

/cc @julieqiu

We can use this issue to track the problem in golang.org/x/tools/cmd/godoc. If it's not fixed separately, it should get resolved when its rendering algorithm is unified with the others.

@dmitshur dmitshur changed the title x/tools/cmd/godoc: Certificate.Leaf anchor is incorrect x/tools/godoc: struct field anchor is added to wrong location when another field comment above it has same prefix Feb 6, 2020
@c-yan
Copy link
Author

c-yan commented May 7, 2022

Documentation has been moved to https://pkg.go.dev/ and fixed, so I'm closing it.

@c-yan c-yan closed this as completed May 7, 2022
@golang golang locked and limited conversation to collaborators May 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

5 participants