diff options
| author | Rob Pike <r@golang.org> | 2015-09-18 14:53:33 -0700 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2015-09-21 16:42:09 +0000 |
| commit | 4e99ed6fef28bc263ec42e63fd717a13367fb659 (patch) | |
| tree | defc568d5ea25b6dc4d89ac11358c576c180aed0 /src/cmd/doc/testdata/pkg.go | |
| parent | fcf8143d638dbc34fdd418f45f8e8b45de802916 (diff) | |
| download | go-4e99ed6fef28bc263ec42e63fd717a13367fb659.tar.xz | |
cmd/doc: don't drop const/var block if first entry is unexported
The code assumed that if the first entry was unexported, all the
entries were. The fix is simple: delete a bunch of code.
Fixes #12286.
Change-Id: Icb09274e99ce97df4d8bddbe59d17a5c0622e4c6
Reviewed-on: https://go-review.googlesource.com/14780
Reviewed-by: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'src/cmd/doc/testdata/pkg.go')
| -rw-r--r-- | src/cmd/doc/testdata/pkg.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cmd/doc/testdata/pkg.go b/src/cmd/doc/testdata/pkg.go index ebefb50b2a..0f06651d6b 100644 --- a/src/cmd/doc/testdata/pkg.go +++ b/src/cmd/doc/testdata/pkg.go @@ -21,6 +21,13 @@ const ( constThree = 3 // Comment on line with constThree. ) +// Const block where first entry is unexported. +const ( + constFour = iota + ConstFive + ConstSix +) + // Variables // Comment about exported variable. @@ -37,6 +44,13 @@ var ( varThree = 3 // Comment on line with varThree. ) +// Var block where first entry is unexported. +var ( + varFour = 4 + VarFive = 5 + varSix = 6 +) + // Comment about exported function. func ExportedFunc(a int) bool |
