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

cmd/doc: a private field may be listed even when only public fields ought to be. #14356

Closed
lootch opened this issue Feb 17, 2016 · 1 comment
Closed
Milestone

Comments

@lootch
Copy link

lootch commented Feb 17, 2016

The following artificial example:

package dummy

type (
    private struct {
        z *int
    }
    Public struct {
        p *int
    }
    Sample struct {
        *Public
        *private
        x *int
    }
)

when inspected with "go doc Sample" yields:

type Sample struct {
    *Public
    *private

    // Has unexported fields.
}

where *private should not appear at all.

@minux minux changed the title Go doc: a private field may be listed even when only public fields ought to be. cmd/doc: a private field may be listed even when only public fields ought to be. Feb 17, 2016
@ianlancetaylor ianlancetaylor added this to the Go1.7 milestone Feb 17, 2016
@gopherbot
Copy link

CL https://golang.org/cl/19701 mentions this issue.

@golang golang locked and limited conversation to collaborators Feb 28, 2017
@rsc rsc unassigned robpike Jun 23, 2022
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

4 participants