Skip to content

cmd/godoc: Nested functions on embedded types are only shown 1 level deep. #9762

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

Closed
klauspost opened this issue Feb 3, 2015 · 1 comment
Closed

Comments

@klauspost
Copy link
Contributor

Test case: http://play.golang.org/p/9oz7e7AKzd

In the example above A embeds b which embeds c. There are public functions on b, which is shown correctly in godoc as belonging to A. However, it seems like godoc only searches 1 level deep, and functions on c are not shown even though they are valid for calls by the compiler.

Reproducible on 1.4.1 and 1.3.3.

Real life example: source / godoc. A specific query type includes "geoJSONQuery" which includes "query", and I would like to have the functions on "query" to show up. I would however prefer not to expose any of the internal types since they aren't useful themselves.

@mikioh mikioh changed the title godoc: Nested functions on embedded types are only shown 1 level deep. cmd/godoc: Nested functions on embedded types are only shown 1 level deep. Feb 3, 2015
@griesemer
Copy link
Contributor

Closed as duplicate of #6127.

The problem is that godoc is using a heuristic and doesn't do much searching in the first place.

Doing this correctly in all cases with go/types integration is a significant chunk of work and thus an open issue.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants