Skip to content

cmd/doc: incorrect suppression of functions returning unexported types #16568

@dsnet

Description

@dsnet

Using go1.7rc2

a33e9cf caused a regression from Go1.6.

Consider the following package snippet:

type private int
func Public() private { return 0 }

Currently I see:

$ go doc

I expect to see:

$ go doc
func Public() private

The issue is that the logic in the above commit classified Public as a constructor and hid it under private, thus displaying nothing. Instead, it should always display functions like this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions