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

Method Write

diode/diode.go:74–80  ·  diode/diode.go::Writer.Write
(p []byte)

Source from the content-addressed store, hash-verified

72}
73
74func (dw Writer) Write(p []byte) (n int, err error) {
75 // p is pooled in zerolog so we can't hold it passed this call, hence the
76 // copy.
77 p = append(bufPool.Get().([]byte), p...)
78 dw.d.Set(diodes.GenericDataType(&p))
79 return len(p), nil
80}
81
82// Close releases the diode poller and call Close on the wrapped writer if
83// io.Closer is implemented.

Callers 1

pollMethod · 0.45

Calls 2

GenericDataTypeTypeAlias · 0.92
SetMethod · 0.65

Tested by

no test coverage detected