Documentation ¶
Overview ¶
Package linewriter implements a write filter that expect "\n" or "\r" ended lines as its input.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CRLF = []byte{'\r', '\n'} CR = CRLF[0:1] LF = CRLF[1:2] )
Functions ¶
This section is empty.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer allows to write input text line by line to provided output io.Writer. If no conversion is enabled it calls output.Write method once per line. In conversion mode it converts any newline to provided nl string but in this case it can use more than one write for one line. If bufio.Writer is used as output it calls its Flush method after each line written.
Click to show internal directories.
Click to hide internal directories.