-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Open
Labels
NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.pkgsite
Milestone
Description
Within my code, I have the following structure. type common struct { Option1 bool } func (c *common) Method1() { } type A struct { OptionA int common } type B struct { OptionB int common } I want godoc to show that type A and type B have field Option1 available, and Method1 in their method sets. However, godoc would not show Option1, because common is not exported. It however show Method1 (the full method set). The only current workaround is to export common (which really is an internal implementation detail), or duplicate the functionality across all types that share it. TO fix, godoc should show these promoted fields got from unexported anonymous fields. For example, godoc output for A could look like: type A struct { OptionA int // contains filtered or unexported fields // Available from unexported anonymous fields Option1 bool } Which version are you using? (run 'go version') go version devel +47b2b07a837f Fri Oct 11 16:39:40 2013 -0700 linux/amd64 Please provide any additional information below.
tscott0, braydentidwell, rzajac, AlekSi, FiloSottile and 1 more
Metadata
Metadata
Assignees
Labels
NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.pkgsite