(p []byte)
| 72 | } |
| 73 | |
| 74 | func (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. |
no test coverage detected