Skip to content

x/pkgsite: display type kind of each named type #6647

Description

@btracey
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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.pkgsite

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions