go/doc: classify function returning slice of T as constructor
Previously, go/doc would only consider functions that return types of T or any number of pointers to T: *T, **T, etc. This change expands the definition of a constructor to also include functions that return slices of a type (or pointer to that type) in its first return. With this change, the following return types classify a function as a constructor of type T: T *T **T (and so on) []T []*T []**T (and so on) Fixes #18063. Change-Id: I9a1a689933e13c6b8eb80b74ceec85bd4cab236d Reviewed-on: https://go-review.googlesource.com/54971Reviewed-by: Robert Griesemer <gri@golang.org>
Showing
Please register or sign in to comment