-- import "vimagination.zapto.org/dos2unix"
Package dos2unix provides functions to convert between dos and unix line termination styles
func DOS2Unix(r io.Reader) io.Reader
DOS2Unix wraps a byte reader with a reader that replaces all instances of \r\n with \n
func Unix2DOS(r io.Reader) io.Reader
Unix2DOS wraps a byte reader with a reader that replaces all instances of \n with \r\n.
When reading from a non-buffered input, it is recommended to wrap the Reader with a bufio.Reader.
func Unix2DOSWriter(w io.Writer) io.Writer
Unix2DOSWriter wraps a io.Writer to convert \n into \r\n
type WriteFlusher interface {
io.Writer
Flush() error
}
WriteFlusher combines the io.Writer interface with a buffer Flush method
func DOS2UnixWriter(w io.Writer) WriteFlusher
DOS2UnixWriter wraps a writer to convert \r\n into \n. It is advisable to call the Flush method upon completion as a final \r may be buffered