MCPcopy
hub / github.com/rs/zerolog / Floats32

Method Floats32

event.go:725–731  ·  view source on GitHub ↗

Floats32 adds the field key with f as a []float32 to the *Event context.

(key string, f []float32)

Source from the content-addressed store, hash-verified

723
724// Floats32 adds the field key with f as a []float32 to the *Event context.
725func (e *Event) Floats32(key string, f []float32) *Event {
726 if e == nil {
727 return e
728 }
729 e.buf = enc.AppendFloats32(enc.AppendKey(e.buf, key), f, FloatingPointPrecision)
730 return e
731}
732
733// Float64 adds the field key with f as a float64 to the *Event context.
734func (e *Event) Float64(key string, f float64) *Event {

Callers 8

TestEvent_WithNilEventFunction · 0.95
TestWithPluralsFunction · 0.45
TestFieldsArrayNilFunction · 0.45
TestFieldsArrayEmptyFunction · 0.45
BenchmarkLogFieldTypeFunction · 0.45

Calls 2

AppendFloats32Method · 0.65
AppendKeyMethod · 0.65

Tested by 8

TestEvent_WithNilEventFunction · 0.76
TestWithPluralsFunction · 0.36
TestFieldsArrayNilFunction · 0.36
TestFieldsArrayEmptyFunction · 0.36
BenchmarkLogFieldTypeFunction · 0.36