MCPcopy
hub / github.com/prometheus/client_golang / MustCurryWith

Method MustCurryWith

prometheus/histogram.go:1301–1307  ·  view source on GitHub ↗

MustCurryWith works as CurryWith but panics where CurryWith would have returned an error.

(labels Labels)

Source from the content-addressed store, hash-verified

1299// MustCurryWith works as CurryWith but panics where CurryWith would have
1300// returned an error.
1301func (v *HistogramVec) MustCurryWith(labels Labels) ObserverVec {
1302 vec, err := v.CurryWith(labels)
1303 if err != nil {
1304 panic(err)
1305 }
1306 return vec
1307}
1308
1309type constHistogram struct {
1310 desc *Desc

Callers 3

ExampleWithExtraMethodsFunction · 0.95
ExampleWithLabelFromCtxFunction · 0.95

Calls 1

CurryWithMethod · 0.95

Tested by 3

ExampleWithExtraMethodsFunction · 0.76
ExampleWithLabelFromCtxFunction · 0.76