From: Robert Griesemer Date: Thu, 18 Sep 2014 23:53:35 +0000 (-0700) Subject: go/doc: document rationale for recent change X-Git-Tag: go1.4beta1~355 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e4fa1e40354dfd1e16c2b1f912bfbbdc8c0dfa9f;p=gostls13.git go/doc: document rationale for recent change LGTM=adg R=adg CC=golang-codereviews https://golang.org/cl/143290043 --- diff --git a/src/go/doc/exports.go b/src/go/doc/exports.go index 9b421e7341..1d3b466d8c 100644 --- a/src/go/doc/exports.go +++ b/src/go/doc/exports.go @@ -12,7 +12,8 @@ import ( ) // filterIdentList removes unexported names from list in place -// and returns the resulting list. +// and returns the resulting list. If blankOk is set, blank +// identifiers are considered exported names. // func filterIdentList(list []*ast.Ident, blankOk bool) []*ast.Ident { j := 0 @@ -145,6 +146,8 @@ func (r *reader) filterSpec(spec ast.Spec, tok token.Token) bool { // always keep imports so we can collect them return true case *ast.ValueSpec: + // special case: consider blank constants as exported + // (work-around for issue 5397) s.Names = filterIdentList(s.Names, tok == token.CONST) if len(s.Names) > 0 { r.filterType(nil, s.Type)