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

Function Complex128

field.go:90–92  ·  view source on GitHub ↗

Complex128 constructs a field that carries a complex number. Unlike most numeric fields, this costs an allocation (to convert the complex128 to interface{}).

(key string, val complex128)

Source from the content-addressed store, hash-verified

88// numeric fields, this costs an allocation (to convert the complex128 to
89// interface{}).
90func Complex128(key string, val complex128) Field {
91 return Field{Key: key, Type: zapcore.Complex128Type, Interface: val}
92}
93
94// Complex128p constructs a field that carries a *complex128. The returned Field will safely
95// and explicitly represent `nil` when appropriate.

Callers 3

TestJSONEncodeEntryFunction · 0.92
TestFieldConstructorsFunction · 0.85
Complex128pFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestJSONEncodeEntryFunction · 0.74
TestFieldConstructorsFunction · 0.68