Documentation
¶
Overview ¶
Package convert provides utilities for converting content such as line endings and determining binary files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCRLFWriter ¶
NewCRLFWriter wraps a writer to convert LF line endings into CRLF line endings. It assumes that data is text; not binary. See Stat.IsBinary.
func NewLFWriter ¶
NewLFWriter wraps a writer to convert CRLF line endings into LF line endings. It assumes that data is text; not binary. See Stat.IsBinary.
Types ¶
type Stat ¶
Stat holds statistics about the content being analyzed.
func GetStat ¶
GetStat returns Stat of the reader based on: https://git.kernel.org/pub/scm/git/git.git/tree/convert.c?id=HEAD#n45
func (Stat) IsBinary ¶
IsBinary detects if data is binary based on: https://git.kernel.org/pub/scm/git/git.git/tree/convert.c?id=HEAD#n94