From 337f04bd6c2b049a68eabd9dcec4f47cd6933d94 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Mon, 20 Nov 2017 14:12:43 +1100 Subject: 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 Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/cmd/doc/testdata/pkg.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cmd/doc/testdata') diff --git a/src/cmd/doc/testdata/pkg.go b/src/cmd/doc/testdata/pkg.go index 99755b11c5..d0995bbf7d 100644 --- a/src/cmd/doc/testdata/pkg.go +++ b/src/cmd/doc/testdata/pkg.go @@ -193,3 +193,8 @@ var LongLine = newLongLine( type T2 int type T1 = T2 + +const ( + Duplicate = iota + duplicate +) -- cgit v1.3