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

Documentation of public methods on private structs is hidden #311

Open
autarch opened this issue Jan 17, 2020 · 2 comments
Open

Documentation of public methods on private structs is hidden #311

autarch opened this issue Jan 17, 2020 · 2 comments

Comments

@autarch
Copy link
Contributor

autarch commented Jan 17, 2020

It seems like a lot of the API documentation is not visible on go.dev or godoc.org because of the fact that these methods belong to private structs used as mixins into public structs.

So for example the *Application returned by kingpin.New has a Flag method provided by its embedded cmdMixin, which in turn embeds a *flagGroup. But this method is entirely missing from the API docs because flagGroup is private.

I don't know that this is easily fixable in v2 but it'd be really nice to fix this in v3.

@autarch autarch changed the title Documentation is hidden because of public methods on private structs Documentation of public methods on private structs is hidden Jan 17, 2020
@alecthomas
Copy link
Owner

This sounds like an upstream bug doesn't it? If the Go compiler allows the visibility, the documentation viewers should too?

@autarch
Copy link
Contributor Author

autarch commented Jan 20, 2020

This sounds like an upstream bug doesn't it? If the Go compiler allows the visibility, the documentation viewers should too?

I sort of agree, but it looks like this has already been reported as an issue (in 2011) and rejected. See golang/go#2273

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants