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

Method Errs

event.go:445–451  ·  view source on GitHub ↗

Errs adds the field key with errs as an array of serialized errors to the *Event context.

(key string, errs []error)

Source from the content-addressed store, hash-verified

443// Errs adds the field key with errs as an array of serialized errors to the
444// *Event context.
445func (e *Event) Errs(key string, errs []error) *Event {
446 if e == nil {
447 return e
448 }
449 arr := e.CreateArray().Errs(errs)
450 return e.Array(key, arr)
451}
452
453// Err adds the field "error" with serialized err to the *Event context.
454// If err is nil, no field is added.

Callers 9

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

Calls 2

CreateArrayMethod · 0.95
ArrayMethod · 0.95

Tested by 9

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