MCPcopy
hub / github.com/uber-go/zap / testEncoders

Function testEncoders

encoder_test.go:72–77  ·  view source on GitHub ↗
(f func())

Source from the content-addressed store, hash-verified

70}
71
72func testEncoders(f func()) {
73 existing := _encoderNameToConstructor
74 _encoderNameToConstructor = make(map[string]func(zapcore.EncoderConfig) (zapcore.Encoder, error))
75 defer func() { _encoderNameToConstructor = existing }()
76 f()
77}
78
79func testEncodersRegistered(t *testing.T, names ...string) {
80 assert.Len(t, _encoderNameToConstructor, len(names), "the expected number of registered encoders does not match the actual number")

Callers 3

TestRegisterEncoderFunction · 0.85
TestNewEncoderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected