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

Function Bool

field.go:63–69  ·  view source on GitHub ↗

Bool constructs a field that carries a bool.

(key string, val bool)

Source from the content-addressed store, hash-verified

61
62// Bool constructs a field that carries a bool.
63func Bool(key string, val bool) Field {
64 var ival int64
65 if val {
66 ival = 1
67 }
68 return Field{Key: key, Type: zapcore.BoolType, Integer: ival}
69}
70
71// Boolp constructs a field that carries a *bool. The returned Field will safely
72// and explicitly represent `nil` when appropriate.

Callers 5

convertAttrToFieldFunction · 0.92
TestFieldConstructorsFunction · 0.85
BenchmarkBoolFieldFunction · 0.85
BoolpFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestFieldConstructorsFunction · 0.68
BenchmarkBoolFieldFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…