Skip to content

Commit ccf0d88

Browse files
committed
add to vars even when there's a hook
Signed-off-by: Mohamed Hamza <[email protected]>
1 parent 9599d97 commit ccf0d88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

go/stats/export.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ func (vg *varGroup) publish(name string, v expvar.Var) {
108108
expvar.Publish(name, v)
109109
if vg.newVarHook != nil {
110110
vg.newVarHook(name, v)
111-
} else {
112-
vg.vars[name] = v
113111
}
112+
113+
vg.vars[name] = v
114114
}
115115

116116
var defaultVarGroup = varGroup{vars: make(map[string]expvar.Var)}

0 commit comments

Comments
 (0)