]> Cypherpunks repositories - gostls13.git/commit
cmd/doc: don't print a declaration twice
authorRob Pike <r@golang.org>
Mon, 20 Nov 2017 03:12:43 +0000 (14:12 +1100)
committerRob Pike <r@golang.org>
Mon, 20 Nov 2017 05:08:37 +0000 (05:08 +0000)
commit337f04bd6c2b049a68eabd9dcec4f47cd6933d94
tree1b517f56782b71e8c8042983eac9582e16297c1a
parent363a5da3b86c2f90c0b2055c37617e8b3bc85fd8
cmd/doc: don't print a declaration twice

That can occur if we have -u set and there is an upper- and lower-case
name of the same spelling in a single declaration.

A rare corner case but easy to fix.

Fix by remembering what we've printed.

Fixes #21797.

Change-Id: Ie0b681ae8c277fa16e9635ba594c1dff272b8aeb
Reviewed-on: https://go-review.googlesource.com/78715
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/doc/doc_test.go
src/cmd/doc/pkg.go
src/cmd/doc/testdata/pkg.go