Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gauge_float64.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func GetOrRegisterGaugeFloat64(name string, r Registry) GaugeFloat64 {
if nil == r {
r = DefaultRegistry
}
return r.GetOrRegister(name, NewGaugeFloat64()).(GaugeFloat64)
return r.GetOrRegister(name, NewGaugeFloat64).(GaugeFloat64)
}

// NewGaugeFloat64 constructs a new StandardGaugeFloat64.
Expand Down
3 changes: 3 additions & 0 deletions gauge_float64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@ func TestGetOrRegisterFunctionalGaugeFloat64(t *testing.T) {
if g := GetOrRegisterGaugeFloat64("foo", r); 47 != g.Value() {
t.Fatal(g)
}
if g := GetOrRegisterGaugeFloat64("foo.xxx", r); 0.0 != g.Value() {
t.Fatal(g)
}
}