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

Method Strs

event.go:326–332  ·  view source on GitHub ↗

Strs adds the field key with vals as a []string to the *Event context. This is the array version that accepts a slice of string values.

(key string, vals []string)

Source from the content-addressed store, hash-verified

324//
325// This is the array version that accepts a slice of string values.
326func (e *Event) Strs(key string, vals []string) *Event {
327 if e == nil {
328 return e
329 }
330 e.buf = enc.AppendStrings(enc.AppendKey(e.buf, key), vals)
331 return e
332}
333
334// StrsV adds the field key with vals as a []string to the *Event context.
335//

Callers 10

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

Calls 2

AppendStringsMethod · 0.65
AppendKeyMethod · 0.65

Tested by 9

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