diff options
author | Robert Griesemer <gri@golang.org> | 2014-09-18 16:53:35 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2014-09-18 16:53:35 -0700 |
commit | e2b51c73025912a3cf13fb8ac1355c1190690ffb (patch) | |
tree | 23173c3633b00478a0cfac418a6c0ad1b583c6bf /src | |
parent | 6448a7e7ced979271a09dd99895b52a997c5cdb3 (diff) | |
download | go-e2b51c73025912a3cf13fb8ac1355c1190690ffb.tar.gz |
go/doc: document rationale for recent change
LGTM=adg
R=adg
CC=golang-codereviews
https://codereview.appspot.com/143290043
Diffstat (limited to 'src')
-rw-r--r-- | src/go/doc/exports.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/go/doc/exports.go b/src/go/doc/exports.go index 9b421e734..1d3b466d8 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) |