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

Method ObjectsV

event.go:290–292  ·  view source on GitHub ↗

ObjectsV adds the field key with objs as an array of objects that implement the LogObjectMarshaler interface to the event. This is a variadic version that accepts a list of individual LogObjectMarshaler objects.

(key string, objs ...LogObjectMarshaler)

Source from the content-addressed store, hash-verified

288//
289// This is a variadic version that accepts a list of individual LogObjectMarshaler objects.
290func (e *Event) ObjectsV(key string, objs ...LogObjectMarshaler) *Event {
291 return e.Objects(key, objs)
292}
293
294// Func allows an anonymous func to run only if the event is enabled.
295func (e *Event) Func(f func(e *Event)) *Event {

Callers 11

TestEvent_WithNilEventFunction · 0.95
ExampleEvent_ObjectsVFunction · 0.45
ExampleContext_ObjectsVFunction · 0.45
TestWithPluralsFunction · 0.45
TestFieldsArrayNilFunction · 0.45
TestFieldsArrayEmptyFunction · 0.45
TestFieldsDisabledFunction · 0.45
BenchmarkLogFieldTypeFunction · 0.45

Calls 1

ObjectsMethod · 0.95

Tested by 11

TestEvent_WithNilEventFunction · 0.76
ExampleEvent_ObjectsVFunction · 0.36
ExampleContext_ObjectsVFunction · 0.36
TestWithPluralsFunction · 0.36
TestFieldsArrayNilFunction · 0.36
TestFieldsArrayEmptyFunction · 0.36
TestFieldsDisabledFunction · 0.36
BenchmarkLogFieldTypeFunction · 0.36