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

Method Float64

event.go:734–740  ·  view source on GitHub ↗

Float64 adds the field key with f as a float64 to the *Event context.

(key string, f float64)

Source from the content-addressed store, hash-verified

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 {
735 if e == nil {
736 return e
737 }
738 e.buf = enc.AppendFloat64(enc.AppendKey(e.buf, key), f, FloatingPointPrecision)
739 return e
740}
741
742// Floats64 adds the field key with f as a []float64 to the *Event context.
743func (e *Event) Floats64(key string, f []float64) *Event {

Callers 15

TestEvent_WithNilEventFunction · 0.95
TestWithFunction · 0.45
TestWithResetFunction · 0.45
TestFieldsFunction · 0.45
TestFieldsDisabledFunction · 0.45
TestArrayFunction · 0.45
TestConsoleLoggerFunction · 0.45
BenchmarkLogFieldTypeFunction · 0.45
appendSlogAttrFunction · 0.45

Calls 2

AppendFloat64Method · 0.65
AppendKeyMethod · 0.65

Tested by 14

TestEvent_WithNilEventFunction · 0.76
TestWithFunction · 0.36
TestWithResetFunction · 0.36
TestFieldsFunction · 0.36
TestFieldsDisabledFunction · 0.36
TestArrayFunction · 0.36
TestConsoleLoggerFunction · 0.36
BenchmarkLogFieldTypeFunction · 0.36
generateFloat64sFunction · 0.36