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: group variables and constants with types #16569

Closed
dsnet opened this issue Aug 2, 2016 · 1 comment
Closed

cmd/doc: group variables and constants with types #16569

dsnet opened this issue Aug 2, 2016 · 1 comment

Comments

@dsnet
Copy link
Member

dsnet commented Aug 2, 2016

This is an extension of #14004, but applied to constants and variables.

Currently I see:

$ go doc reflect | egrep "ChanDir|Kind"
const RecvDir ChanDir = 1 << iota ...
const Invalid Kind = iota ...
type ChanDir int
type Kind uint

I expect to see:

$ go doc reflect | egrep "ChanDir|Kind"
type ChanDir int
    const RecvDir ChanDir = 1 << iota ...
type Kind uint
    const Invalid Kind = iota ...

This would make the go doc tool more consistent with itself (we do groupiing for functions, but not variables and constants) and also with the display of godoc. More importantly, it makes the printout easier to parse by human eyes.

\cc @robpike, I can make the change in Go1.8, if you're okay with this.

@quentinmit quentinmit added this to the Go1.8Maybe milestone Aug 4, 2016
@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Oct 1, 2017
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