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

Function Complex128p

field.go:96–101  ·  view source on GitHub ↗

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

(key string, val *complex128)

Source from the content-addressed store, hash-verified

94// Complex128p constructs a field that carries a *complex128. The returned Field will safely
95// and explicitly represent `nil` when appropriate.
96func Complex128p(key string, val *complex128) Field {
97 if val == nil {
98 return nilField(key)
99 }
100 return Complex128(key, *val)
101}
102
103// Complex64 constructs a field that carries a complex number. Unlike most
104// numeric fields, this costs an allocation (to convert the complex64 to

Callers 1

TestFieldConstructorsFunction · 0.85

Calls 2

nilFieldFunction · 0.85
Complex128Function · 0.85

Tested by 1

TestFieldConstructorsFunction · 0.68