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

Function nilField

field.go:51–51  ·  view source on GitHub ↗

nilField returns a field which will marshal explicitly as nil. See motivation in https://github.com/uber-go/zap/issues/753 . If we ever make breaking changes and add zapcore.NilType and zapcore.ObjectEncoder.AddNil, the implementation here should be changed to reflect that.

(key string)

Source from the content-addressed store, hash-verified

49// changes and add zapcore.NilType and zapcore.ObjectEncoder.AddNil, the
50// implementation here should be changed to reflect that.
51func nilField(key string) Field { return Reflect(key, nil) }
52
53// Binary constructs a field that carries an opaque binary blob.
54//

Callers 15

TestFieldConstructorsFunction · 0.85
BoolpFunction · 0.85
Complex128pFunction · 0.85
Complex64pFunction · 0.85
Float64pFunction · 0.85
Float32pFunction · 0.85
IntpFunction · 0.85
Int64pFunction · 0.85
Int32pFunction · 0.85
Int16pFunction · 0.85
Int8pFunction · 0.85
StringpFunction · 0.85

Calls 1

ReflectFunction · 0.85

Tested by 1

TestFieldConstructorsFunction · 0.68