We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9ec8e7 commit e4fa1e4Copy full SHA for e4fa1e4
src/go/doc/exports.go
@@ -12,7 +12,8 @@ import (
12
)
13
14
// filterIdentList removes unexported names from list in place
15
-// and returns the resulting list.
+// and returns the resulting list. If blankOk is set, blank
16
+// identifiers are considered exported names.
17
//
18
func filterIdentList(list []*ast.Ident, blankOk bool) []*ast.Ident {
19
j := 0
@@ -145,6 +146,8 @@ func (r *reader) filterSpec(spec ast.Spec, tok token.Token) bool {
145
146
// always keep imports so we can collect them
147
return true
148
case *ast.ValueSpec:
149
+ // special case: consider blank constants as exported
150
+ // (work-around for issue 5397)
151
s.Names = filterIdentList(s.Names, tok == token.CONST)
152
if len(s.Names) > 0 {
153
r.filterType(nil, s.Type)
0 commit comments