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

Function Arr

array.go:50–57  ·  view source on GitHub ↗

Arr creates an array to be added to an Event or Context. WARNING: This function is deprecated because it does not preserve the stack, hooks, and context from the parent event. Deprecated: Use Event.CreateArray or Context.CreateArray instead.

()

Source from the content-addressed store, hash-verified

48// the stack, hooks, and context from the parent event.
49// Deprecated: Use Event.CreateArray or Context.CreateArray instead.
50func Arr() *Array {
51 a := arrayPool.Get().(*Array)
52 a.buf = a.buf[:0]
53 a.stack = false
54 a.ctx = nil
55 a.ch = nil
56 return a
57}
58
59// MarshalZerologArray method here is no-op - since data is
60// already in the needed format.

Callers 6

CreateArrayMethod · 0.85
TestArrayFunction · 0.85
CreateArrayMethod · 0.85
BenchmarkLogArrayObjectFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestArrayFunction · 0.68
BenchmarkLogArrayObjectFunction · 0.68