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: suppresses const blocks that start with unexported names #12286

Closed
dsnet opened this issue Aug 24, 2015 · 2 comments
Closed

cmd/doc: suppresses const blocks that start with unexported names #12286

dsnet opened this issue Aug 24, 2015 · 2 comments

Comments

@dsnet
Copy link
Member

dsnet commented Aug 24, 2015

Using Go1.5

Given a package of the following:

package foo

const (
    Foo = iota
    Bar
    Baz
)

const (
    unexported = iota
    Exported
    Another
)

const (
    Kilo = 1E3
    Mega = 1E6
    Giga = 1E9
)

The go doc tool prints the following:

package foo // import "."

const Foo = iota ...
const Kilo = 1E3 ...

I expect the following:

package foo // import "."

const Foo = iota ...
const Exported ...
const Kilo = 1E3 ...

The "go doc" tool should not hide the existance of the "Exported" const.

@dsnet
Copy link
Member Author

dsnet commented Aug 24, 2015

This may be related to #11705, but I'm not sure what exactly the author is expecting in that issue.

Also, I would be interested in fixing this issue if nobody wants to take it.

@robpike robpike added this to the Go1.6Early milestone Aug 24, 2015
@robpike robpike self-assigned this Aug 24, 2015
@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Sep 22, 2016
@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

3 participants