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

Function Float64p

field.go:128–133  ·  view source on GitHub ↗

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

(key string, val *float64)

Source from the content-addressed store, hash-verified

126// Float64p constructs a field that carries a *float64. The returned Field will safely
127// and explicitly represent `nil` when appropriate.
128func Float64p(key string, val *float64) Field {
129 if val == nil {
130 return nilField(key)
131 }
132 return Float64(key, *val)
133}
134
135// Float32 constructs a field that carries a float32. The way the
136// floating-point value is represented is encoder-dependent, so marshaling is

Callers 1

TestFieldConstructorsFunction · 0.85

Calls 2

nilFieldFunction · 0.85
Float64Function · 0.85

Tested by 1

TestFieldConstructorsFunction · 0.68