Skip to content

x/tools/cmd/godoc: public fields of a private embedded struct do not appear in GoDoc #59951

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
ijrsvt opened this issue May 3, 2023 · 2 comments
Labels
FrozenDueToAge Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@ijrsvt
Copy link

ijrsvt commented May 3, 2023

What version of Go are you using (go version)?

$ go version
go version go1.20.1 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOOS="darwin"

What did you do?

I created two structs, one private, one public. I attached a public method to the private struct and then embedded the private struct in the public struct. I can access that public method from elsewhere, but cannot view it in Godoc. Code below:

type min interface {
	Var()
}

type Other interface {
	Something()
}

type Max struct {
	Other
	min
}

What did you expect to see?

  • I expect to see that this in an available method on the public struct.

What did you see instead?

Screenshot 2023-05-03 at 10 33 05 AM

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label May 3, 2023
@gopherbot gopherbot added this to the Unreleased milestone May 3, 2023
@cagedmantis cagedmantis changed the title x/tools/cmd/godoc Public fields of a private embedded struct do not appear in GoDoc x/tools/cmd/godoc: public fields of a private embedded struct do not appear in GoDoc May 3, 2023
@zigo101
Copy link

zigo101 commented May 4, 2023

related: #6600

@cherrymui
Copy link
Member

Yes, see #6600 . Closing as a dup. Thanks.

@cherrymui cherrymui closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2023
@golang golang locked and limited conversation to collaborators May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants