Skip to content

godoc should show Exported methods for unexported types #2273

@mark-summerfield

Description

@mark-summerfield
8a09ce0cefc6 weekly/weekly.2011-09-16

A common scenario:

type unexported struct { ... }
type Exported interface { Public(); ... }

// Public() does things
func (u unexported) Public() { ... }

The struct is unexported because we don't want its internals accessed except via
exported methods.

The interface is exported so that users can pass pointers to the struct as items of type
Exported.

But godoc *ignores* the docs for the unexported.Public() method, which it seems to me it
shouldn't do.

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