MCPcopy
hub / github.com/uber-go/zap / MarshalLogArray

Method MarshalLogArray

zapcore/error.go:94–108  ·  view source on GitHub ↗
(arr ArrayEncoder)

Source from the content-addressed store, hash-verified

92type errArray []error
93
94func (errs errArray) MarshalLogArray(arr ArrayEncoder) error {
95 for i := range errs {
96 if errs[i] == nil {
97 continue
98 }
99
100 el := newErrArrayElem(errs[i])
101 err := arr.AppendObject(el)
102 el.Free()
103 if err != nil {
104 return err
105 }
106 }
107 return nil
108}
109
110var _errArrayElemPool = pool.New(func() *errArrayElem {
111 return &errArrayElem{}

Callers

nothing calls this directly

Calls 3

newErrArrayElemFunction · 0.85
AppendObjectMethod · 0.65
FreeMethod · 0.45

Tested by

no test coverage detected