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