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

Function TestNil

prometheus/promauto/auto_test.go:22–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20)
21
22func TestNil(t *testing.T) {
23 // A nil registerer should be treated as a no-op by promauto.
24 With(nil).NewCounter(prometheus.CounterOpts{Name: "test"}).Inc()
25}

Callers

nothing calls this directly

Calls 3

WithFunction · 0.85
NewCounterMethod · 0.80
IncMethod · 0.65

Tested by

no test coverage detected