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

Function Float32p

field.go:144–149  ·  view source on GitHub ↗

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

(key string, val *float32)

Source from the content-addressed store, hash-verified

142// Float32p constructs a field that carries a *float32. The returned Field will safely
143// and explicitly represent `nil` when appropriate.
144func Float32p(key string, val *float32) Field {
145 if val == nil {
146 return nilField(key)
147 }
148 return Float32(key, *val)
149}
150
151// Int constructs a field with the given key and value.
152func Int(key string, val int) Field {

Callers 1

TestFieldConstructorsFunction · 0.85

Calls 2

nilFieldFunction · 0.85
Float32Function · 0.85

Tested by 1

TestFieldConstructorsFunction · 0.68