func (h *MultiLineHandler) sendBuffer() {
	defer func() {
		h.buffer.Reset()
		h.linesLen = 0
		h.shouldTruncate = false
	}()

	data := bytes.TrimSpace(h.buffer.Bytes())
	content := make([]byte, len(data))
	copy(content, data)

	if len(content) > 0 || h.linesLen > 0 {
		h.outputChan <- NewMessage(content, h.status, h.linesLen, h.timestamp)
	}
}
// sendBuffer forwards the content stored in the buffer
// to the output channel.
sendBuffer forwards the content stored in the buffer
to the output channel.
// sendBuffer forwards the content stored in the buffer // to the output channel .
func (h *MultiLineHandler) sendBuffer() {
	defer func() {
		h.buffer.Reset()
		h.linesLen = 0
		h.shouldTruncate = false
	}()
	data := bytes.TrimSpace(h.buffer.Bytes())
	content := make([]byte, len(data))
	copy(content, data)
	if len(content) > 0 || h.linesLen > 0 {
		h.outputChan <- NewMessage(content, h.status, h.linesLen, h.timestamp)
	}
}
func ( h * MultiLineHandler ) sendBuffer ( ) { defer func ( ) { h . buffer . Reset ( ) h . linesLen = 0 h . shouldTruncate = false } ( ) data := bytes . TrimSpace ( h . buffer . Bytes ( ) ) content := make ( [ ] byte , len ( data ) ) copy ( content , data ) if len ( content ) > 0 || h . linesLen > 0 { h . outputChan <- NewMessage ( content , h . status , h . linesLen , h . timestamp ) } }
sendBuffer forwards the content stored in the buffer
to the output channel.
sendBuffer forwards the content stored in the buffer to the output channel .