aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/doc/testdata/pkg.go
diff options
context:
space:
mode:
authorJoe Tsai <joetsai@digital-static.net>2016-08-01 20:04:25 -0700
committerJoe Tsai <thebrokentoaster@gmail.com>2016-08-02 03:24:48 +0000
commit6317c213c953d0879fe88593b4372f03d25f369b (patch)
tree3093266fa810c3cd1d1adc3fcc77af70d6499b94 /src/cmd/doc/testdata/pkg.go
parentf5758739a8f011c1d146a7736ab8f0d2834e1783 (diff)
downloadgo-6317c213c953d0879fe88593b4372f03d25f369b.tar.xz
cmd/doc: ensure functions with unexported return values are shown
The commit in golang.org/cl/22354 groups constructors functions under the type that they construct to. However, this caused a minor regression where functions that had unexported return values were not being printed at all. Thus, we forgo the grouping logic if the type the constructor falls under is not going to be printed. Fixes #16568 Change-Id: Idc14f5d03770282a519dc22187646bda676af612 Reviewed-on: https://go-review.googlesource.com/25369 Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> Reviewed-by: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/doc/testdata/pkg.go')
-rw-r--r--src/cmd/doc/testdata/pkg.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/doc/testdata/pkg.go b/src/cmd/doc/testdata/pkg.go
index 9c5cf8f557..6a52ac2f65 100644
--- a/src/cmd/doc/testdata/pkg.go
+++ b/src/cmd/doc/testdata/pkg.go
@@ -123,3 +123,6 @@ const unexportedTypedConstant unexportedType = 1 // In a separate section to tes
// For case matching.
const CaseMatch = 1
const Casematch = 2
+
+func ReturnUnexported() unexportedType { return 0 }
+func ReturnExported() ExportedType { return ExportedType{} }