Skip to content

godoc should format interface types more like other types, displaying methods individually #20326

Closed
@cpcallen

Description

@cpcallen

In e.g. the documentation for the reflect package, concrete types like Value have their methods listed and documented individually, while interface types like Type do not, but force the reader to grovel through the actual source code of interface to find the methods declared on the type. This is a great inconvenience to the reader, particularly because as a consequence the interface type's methods are not listed in the table of contents.

It seems particularly egregious in cases like reflect.Type where the concrete types that fulfil the interface are all unexported, and the user is unlikely to be creating more. The fact that Type is an interface is of no real interest to the reader, and should not affect the format in which the documentation is presented.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions