-
Notifications
You must be signed in to change notification settings - Fork 18.1k
godoc should compute actual method set #1000
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
Labels
Milestone
Comments
Doing this reasonably correctly will require a significant rewrite of the current documentation extraction mechanism: Non-exported AST nodes are stripped via ast.PackageExports (or ast.FileExports), at which point non-exported anonymous fields are not present anymore even if they have exported methods and are used inside exported structs. Thus, at this point, the go.doc code cannot associate exported methods of non-exported anonymous fields with the exported type containing those fields. At best, we can do it for exported anonymous fields, and even then, the field types must be defined locally (in the same package). A 100% correct solution will require full type information. |
We don't need a 100% correct solution, but it would be very helpful to handle the case of an embedded unexported field. Even if it means special handling for that one case, not being able to get docs for those methods is complicating some code that would otherwise be simpler (package net comes to mind), all just to get doc comments. |
This issue was closed by revision 9535b86. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: