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/godoc: some consts are not well represented #5397

Closed
rogpeppe opened this Issue May 3, 2013 · 9 comments

Comments

Projects
None yet
7 participants
@rogpeppe
Copy link
Contributor

rogpeppe commented May 3, 2013

See for example this page: http://tip.golang.org/pkg/reflect/#pkg-constants

The SelectDir constants are defined in the source, not unusually, like this:

const (
    _             SelectDir = iota
    SelectSend              // case Chan <- Send
    SelectRecv              // case <-Chan:
    SelectDefault           // default
)

Unfortunately in the documentation the type is lost. Those constants should probably
appear under the SelectDir type as, for example, the ChanDir constants do.
@robpike

This comment has been minimized.

Copy link
Contributor

robpike commented May 28, 2013

Comment 1:

Labels changed: added priority-later, godoc, removed priority-triage.

Owner changed to @griesemer.

Status changed to Accepted.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Nov 27, 2013

Comment 3:

Labels changed: added go1.3maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Dec 4, 2013

Comment 4:

Labels changed: added release-none, removed go1.3maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Dec 4, 2013

Comment 5:

Labels changed: added repo-tools.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

ianlancetaylor commented Apr 20, 2014

Comment 6:

Labels changed: added release-go1.4, removed priority-later, godoc, release-none.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

ianlancetaylor commented Apr 20, 2014

Comment 7:

Issue #7815 has been merged into this issue.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Sep 15, 2014

Comment 8:

Can someone PLEASE fix this for 1.4?
@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Sep 18, 2014

Comment 9:

CL https://golang.org/cl/144110044 mentions this issue.
@josharian

This comment has been minimized.

Copy link
Contributor

josharian commented Sep 18, 2014

Comment 10:

This issue was closed by revision 2b59c9d.

Status changed to Fixed.

@rogpeppe rogpeppe added fixed labels Sep 18, 2014

josharian added a commit to josharian/go that referenced this issue Dec 23, 2014

go/doc: propagate types from unexported constants
When constants were declared using unexported constants,
the type information was lost when those constants were filtered out.
This CL propagates the type information of unexported constants
so that it is available for display.

This is a follow-up to CL 144110044, which fixed this problem
specifically for _ constants.

Updates golang#5397.

Change-Id: I3f0c767a4007d88169a5634ab2870deea4e6a740

josharian added a commit to josharian/go that referenced this issue Dec 30, 2014

go/doc: propagate types from unexported constants
When constants were declared using unexported constants,
the type information was lost when those constants were filtered out.
This CL propagates the type information of unexported constants
so that it is available for display.

This is a follow-up to CL 144110044, which fixed this problem
specifically for _ constants.

Updates golang#5397.

Change-Id: I3f0c767a4007d88169a5634ab2870deea4e6a740

josharian added a commit that referenced this issue Jan 6, 2015

go/doc: propagate types from unexported constants
When constants were declared using unexported constants,
the type information was lost when those constants were filtered out.
This CL propagates the type information of unexported constants
so that it is available for display.

This is a follow-up to CL 144110044, which fixed this problem
specifically for _ constants.

Updates #5397.

Change-Id: I3f0c767a4007d88169a5634ab2870deea4e6a740
Reviewed-on: https://go-review.googlesource.com/2091
Reviewed-by: Robert Griesemer <gri@golang.org>

josharian added a commit to josharian/go that referenced this issue Jan 6, 2015

go/doc: propagate types from unexported constants
When constants were declared using unexported constants,
the type information was lost when those constants were filtered out.
This CL propagates the type information of unexported constants
so that it is available for display.

This is a follow-up to CL 144110044, which fixed this problem
specifically for _ constants.

Updates golang#5397.

Change-Id: I3f0c767a4007d88169a5634ab2870deea4e6a740

josharian added a commit that referenced this issue Feb 4, 2015

go/doc: don't treat _ consts as exported
golang.org/cl/144110044 made _ consts treated
as exported as a small, safe fix for #5397.
It also introduced issue #9615.

golang.org/cl/2091 then fixed the underlying issue,
which was missing type information when the type
was specified only for _.

This cl reverts the original fix.

Fixes #9615.

Change-Id: I4815ad8292bb5bec18beb8c131b48949d9af8876
Reviewed-on: https://go-review.googlesource.com/3832
Reviewed-by: Robert Griesemer <gri@golang.org>

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015

@rsc rsc removed the release-go1.4 label Apr 14, 2015

@golang golang locked and limited conversation to collaborators Jun 24, 2016

wheatman added a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018

go/doc: treat _ consts as exported
Fixes golang#5397.

LGTM=adg
R=gri, adg
CC=golang-codereviews, rsc
https://golang.org/cl/144110044

wheatman added a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018

go/doc: treat _ consts as exported
Fixes golang#5397.

LGTM=adg
R=gri, adg
CC=golang-codereviews, rsc
https://golang.org/cl/144110044

wheatman added a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018

go/doc: treat _ consts as exported
Fixes golang#5397.

LGTM=adg
R=gri, adg
CC=golang-codereviews, rsc
https://golang.org/cl/144110044

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.