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

Method MustCurryWith

prometheus/counter.go:324–330  ·  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

322// MustCurryWith works as CurryWith but panics where CurryWith would have
323// returned an error.
324func (v *CounterVec) MustCurryWith(labels Labels) *CounterVec {
325 vec, err := v.CurryWith(labels)
326 if err != nil {
327 panic(err)
328 }
329 return vec
330}
331
332// CounterFunc is a Counter whose value is determined at collect time by calling a
333// provided function.

Callers 1

TestLabelCheckFunction · 0.95

Calls 1

CurryWithMethod · 0.95

Tested by 1

TestLabelCheckFunction · 0.76