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

Method Dur

context.go:424–427  ·  view source on GitHub ↗

Dur 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

422
423// Dur adds the field key with d divided by unit and stored as a float.
424func (c Context) Dur(key string, d time.Duration) Context {
425 c.l.context = enc.AppendDuration(enc.AppendKey(c.l.context, key), d, DurationFieldUnit, DurationFieldFormat, DurationFieldInteger, FloatingPointPrecision)
426 return c
427}
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 {

Callers

nothing calls this directly

Calls 2

AppendDurationMethod · 0.65
AppendKeyMethod · 0.65

Tested by

no test coverage detected