LineWriter is an io.Writer that processes data line-by-line via a callback. Lines do not include the trailing newline. Lines longer than maxLineLength are dropped.
| 92 | // LineWriter is an io.Writer that processes data line-by-line via a callback. |
| 93 | // Lines do not include the trailing newline. Lines longer than maxLineLength are dropped. |
| 94 | type LineWriter struct { |
| 95 | lineBuf lineBuf |
| 96 | lineFn func([]byte) |
| 97 | } |
| 98 | |
| 99 | // NewLineWriter creates a new LineWriter with the given callback function. |
| 100 | func NewLineWriter(lineFn func([]byte)) *LineWriter { |
nothing calls this directly
no outgoing calls
no test coverage detected