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

x/tools/cmd/godoc: display type kind of each named type #6647

Open
btracey opened this issue Oct 23, 2013 · 4 comments
Open

x/tools/cmd/godoc: display type kind of each named type #6647

btracey opened this issue Oct 23, 2013 · 4 comments
Milestone

Comments

@btracey
Copy link
Contributor

btracey commented Oct 23, 2013

Currently godoc does not list the base type of type, for example:

http://golang.org/pkg/encoding/json/#Decoder

type Decoder
    func NewDecoder(r io.Reader) *Decoder
    func (dec *Decoder) Buffered() io.Reader
type Marshaler
type MarshalerError
    func (e *MarshalerError) Error() string


It would be really nice if this were listed as:

type Decoder struct
    func NewDecoder(r io.Reader) *Decoder
    func (dec *Decoder) Buffered() io.Reader
type Marshaler interface
type MarshalerError struct
    func (e *MarshalerError) Error() string

It's often hard to tell if a name represents an interface or a methodless non-interface
(for example, here Decoder has the -er suffix typical of interfaces). Additionally, many
times the use of a type is much clearer if it is easily seen that it has an int as the
underlying representation (or whatever).
@robpike
Copy link
Contributor

robpike commented Oct 23, 2013

Comment 1:

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

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 2:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 3:

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

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 4:

Labels changed: added repo-tools.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title godoc: display type kind of each named type x/tools/cmd/godoc: display type kind of each named type Apr 14, 2015
@rsc rsc removed the repo-tools label Apr 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants