Categorygithub.com/jf-tech/iohelper
modulepackage
1.0.7
Repository: https://github.com/jf-tech/iohelper.git
Documentation: pkg.go.dev

# README

Deprecated - Kept for existing project references but for new usage please use github.com/jf-tech/go-corelib/ios package.

iohelper

CI codecov Go Report Card PkgGoDev

Collection of I/O helpers in Golang

Golang Version: 1.12.17

# Functions

NewBytesReplacingReader creates a new `*BytesReplacingReader`.
NewLineCountingReader creates new LineCountingReader wrapping around an input io.Reader.
NewLineNumReportingCsvReader creates a new `*LineNumReportingCsvReader`.
NewScannerByDelim creates a scanner that returns tokens from the source reader separated by a delimiter.
NewScannerByDelim2 creates a scanner that returns tokens from the source reader separated by a delimiter, with consideration of potential presence of escaping sequence.
ReadLine reads in a single line from a bufio.Reader.
StripBOM returns a new io.Reader that, if needed, strips away the BOM (byte order marker) of the input io.Reader.

# Constants

ScannerByDelimFlagDefault specifies the most commonly used flags for the scanner.
ScannerByDelimFlagDropDelimInReturn specifies that the delimiter should NOT be included in the return value.
ScannerByDelimFlagEofAsDelim specifies that the scanner should treat EOF as the delimiter as well.
ScannerByDelimFlagEofNotAsDelim specifies that the scanner should NOT treat EOF as the delimiter.
ScannerByDelimFlagIncludeDelimInReturn specifies that the delimiter should be included in the return value.

# Structs

BytesReplacingReader allows transparent replacement of a given token during read operation.
LineCountingReader wraps an io.Reader and reports currently which line the reader is at.
LineNumReportingCsvReader wraps std lib `*csv.Reader` and exposes the current line number.

# Type aliases

ScannerByDelimFlag is the type of flags passed to NewScannerByDelim/NewScannerByDelim2.