Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/doc: const group declaration with unexported item causes doc -u to print the output twice #21797

Closed
willfaught opened this issue Sep 8, 2017 · 1 comment

Comments

@willfaught
Copy link
Contributor

What version of Go are you using (go version)?

go version go1.9 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/willfaught/Developer/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.9/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.9/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_1/ggvd2t1x7hz_185crsb36zlr0000gp/T/go-build763128117=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

In package "t":

const (
	C = iota
	c
)

In the terminal:

$ go doc -u t c

What did you expect to see?

const (
	C = iota
	c
)

What did you see instead?

const (
	C = iota
	c
)
const (
	C = iota
	c
)
@robpike robpike self-assigned this Sep 8, 2017
@robpike robpike added this to the Go1.10 milestone Sep 8, 2017
@ianlancetaylor ianlancetaylor changed the title doc: const group declaration with unexported item causes doc -u to print the output twice cmd/doc: const group declaration with unexported item causes doc -u to print the output twice Sep 8, 2017
@gopherbot
Copy link

Change https://golang.org/cl/78715 mentions this issue: cmd/doc: don't print a declaration twice

@golang golang locked and limited conversation to collaborators Nov 20, 2018
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants