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

Function Boolp

field.go:73–78  ·  view source on GitHub ↗

Boolp constructs a field that carries a *bool. The returned Field will safely and explicitly represent `nil` when appropriate.

(key string, val *bool)

Source from the content-addressed store, hash-verified

71// Boolp constructs a field that carries a *bool. The returned Field will safely
72// and explicitly represent `nil` when appropriate.
73func Boolp(key string, val *bool) Field {
74 if val == nil {
75 return nilField(key)
76 }
77 return Bool(key, *val)
78}
79
80// ByteString constructs a field that carries UTF-8 encoded text as a []byte.
81// To log opaque binary blobs (which aren't necessarily valid UTF-8), use

Callers 1

TestFieldConstructorsFunction · 0.85

Calls 2

nilFieldFunction · 0.85
BoolFunction · 0.85

Tested by 1

TestFieldConstructorsFunction · 0.68