crlf

package module
v0.0.0-...-a983523 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

README

crlf

io.writer implementation to make fussing windows applications happy with files

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(name string) (io.WriteCloser, error)

Create opens a text file for writing, with platform-appropriate line ending conversion.

func NewWriter

func NewWriter(w io.Writer) io.Writer

NewWriter returns an io.Writer that converts LF line endings to CRLF.

func Windows1252Crlf

func Windows1252Crlf() transform.Transformer

Windows1252Crlf returns a transformer that converts to Crlf and and windows 1252

Types

type Crlf

type Crlf struct {
}

Transformer implements a io.Writer object

func (Crlf) Reset

func (Crlf) Reset()

func (Crlf) Transform

func (Crlf) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error)

Transform only converts CRLF. This must be chained with Windows1252 encoder to encode to 1252

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL