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

Method Durs

context.go:430–433  ·  view source on GitHub ↗

Durs adds the field key with d divided by unit and stored as a float.

(key string, d []time.Duration)

Source from the content-addressed store, hash-verified

428
429// Durs adds the field key with d divided by unit and stored as a float.
430func (c Context) Durs(key string, d []time.Duration) Context {
431 c.l.context = enc.AppendDurations(enc.AppendKey(c.l.context, key), d, DurationFieldUnit, DurationFieldFormat, DurationFieldInteger, FloatingPointPrecision)
432 return c
433}
434
435// Interface adds the field key with obj marshaled using reflection.
436func (c Context) Interface(key string, i interface{}) Context {

Callers

nothing calls this directly

Calls 2

AppendDurationsMethod · 0.65
AppendKeyMethod · 0.65

Tested by

no test coverage detected