MCPcopy
hub / github.com/wavetermdev/waveterm / LineWriter

Struct LineWriter

pkg/util/utilfn/streamtolines.go:94–97  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
94type LineWriter struct {
95 lineBuf lineBuf
96 lineFn func([]byte)
97}
98
99// NewLineWriter creates a new LineWriter with the given callback function.
100func NewLineWriter(lineFn func([]byte)) *LineWriter {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected