// determine values list with which to associate the Value for this decl
values := &r.values
const threshold = 0.75
- if domName != "" && domFreq >= int(float64(len(decl.Specs))*threshold) {
+ if domName != "" && r.isVisible(domName) && domFreq >= int(float64(len(decl.Specs))*threshold) {
// typed entries are sufficiently frequent
if typ := r.lookupType(domName); typ != nil {
values = &typ.values // associate with that type
testdata/b.go
CONSTANTS
+ //
+ const (
+ C1 notExported = iota
+ C2
+
+ C4
+ C5
+ )
+
+ //
+ const C notExported = 0
+
//
const Pi = 3.14 // Pi
VARIABLES
+ //
+ var (
+ U1, U2, U4, U5 notExported
+
+ U7 notExported = 7
+ )
+
//
var MaxInt int // MaxInt
+ //
+ var V notExported
+
+ //
+ var V1, V2, V4, V5 notExported
+
FUNCTIONS
//
func F(x int) int
+ //
+ func F1() notExported
+
// Always under the package functions list.
func NotAFactory() int
//
func (x *T) M()
+ //
+ type notExported int
+
+ //
+ const (
+ C1 notExported = iota
+ C2
+ c3
+ C4
+ C5
+ )
+
+ //
+ const C notExported = 0
+
+ //
+ var (
+ U1, U2, u3, U4, U5 notExported
+ u6 notExported
+ U7 notExported = 7
+ )
+
+ //
+ var V notExported
+
+ //
+ var V1, V2, v3, V4, V5 notExported
+
+ //
+ func F1() notExported
+
+ //
+ func f2() notExported
+
// Should only appear if AllDecls is set.
- type uint struct{}
+ type uint struct{} // overrides a predeclared type uint
// Associated with uint type if AllDecls is set.
func UintFactory() uint
testdata/b.go
CONSTANTS
+ //
+ const (
+ C1 notExported = iota
+ C2
+
+ C4
+ C5
+ )
+
+ //
+ const C notExported = 0
+
//
const Pi = 3.14 // Pi
VARIABLES
+ //
+ var (
+ U1, U2, U4, U5 notExported
+
+ U7 notExported = 7
+ )
+
//
var MaxInt int // MaxInt
+ //
+ var V notExported
+
+ //
+ var V1, V2, V4, V5 notExported
+
FUNCTIONS
//
func F(x int) int
+ //
+ func F1() notExported
+
// Always under the package functions list.
func NotAFactory() int
import "a"
+// ----------------------------------------------------------------------------
// Basic declarations
const Pi = 3.14 // Pi
// Should only appear if AllDecls is set.
type uint struct{} // overrides a predeclared type uint
+
+// ----------------------------------------------------------------------------
+// Exported declarations associated with non-exported types must always be shown.
+
+type notExported int
+
+const C notExported = 0
+
+const (
+ C1 notExported = iota
+ C2
+ c3
+ C4
+ C5
+)
+
+var V notExported
+var V1, V2, v3, V4, V5 notExported
+
+var (
+ U1, U2, u3, U4, U5 notExported
+ u6 notExported
+ U7 notExported = 7
+)
+
+func F1() notExported {}
+func f2() notExported {}