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

Method Interface

array.go:238–244  ·  view source on GitHub ↗

Interface appends i marshaled using reflection.

(i interface{})

Source from the content-addressed store, hash-verified

236
237// Interface appends i marshaled using reflection.
238func (a *Array) Interface(i interface{}) *Array {
239 if obj, ok := i.(LogObjectMarshaler); ok {
240 return a.Object(obj)
241 }
242 a.buf = enc.AppendInterface(enc.AppendArrayDelim(a.buf), i)
243 return a
244}
245
246// IPAddr adds a net.IP IPv4 or IPv6 address to the array
247func (a *Array) IPAddr(ip net.IP) *Array {

Callers 1

ErrsMethod · 0.95

Calls 3

ObjectMethod · 0.95
AppendInterfaceMethod · 0.65
AppendArrayDelimMethod · 0.65

Tested by

no test coverage detected