Does this issue reproduce with the latest release?
Yes
What did you do?
$ go doc comment.Parser
[...]
// Setting LookupPackage to nil is equivalent to setting it to
// a function that always returns "", false.
LookupPackage func(name string) (importPath string, ok bool)
[...]
$ go doc comment.DefaultLookupPackage
package comment // import "go/doc/comment"
func DefaultLookupPackage(name string) (importPath string, ok bool)
DefaultLookupPackage is the default package lookup function, used when
Parser.LookupPackage is nil. It recognizes names of the packages from the
standard library with single-element import paths, such as math, which would
otherwise be impossible to name.
[...]
What did you expect to see?
Consistent documentation.
What did you see instead?
Contradictory statements in the documentation for comment.Parser and comment.DefaultLookupPackage regarding the behavior when comment.Parser.LookupPackage == nil.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
What did you expect to see?
Consistent documentation.
What did you see instead?
Contradictory statements in the documentation for
comment.Parser
andcomment.DefaultLookupPackage
regarding the behavior whencomment.Parser.LookupPackage == nil
.