newlinefixer

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNewlineFixerClosed = errors.New("Already closed")

Functions

This section is empty.

Types

type ErrorBadInput

type ErrorBadInput struct {
	// contains filtered or unexported fields
}

func (*ErrorBadInput) Error

func (err *ErrorBadInput) Error() string

type NewlineFixer

type NewlineFixer struct {
	// contains filtered or unexported fields
}

TODO: configurable timeouts? Canonicalizes "\r\n" to "\n". Safe to use concurrently.

func New

func New(w io.Writer) *NewlineFixer

Takes ownership of `w` until Close() is called.

func (*NewlineFixer) Close

func (nf *NewlineFixer) Close()

Idempotent

func (*NewlineFixer) Write

func (nf *NewlineFixer) Write(x []byte) (n int, err error)

Jump to

Keyboard shortcuts

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