reader

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: MIT Imports: 2 Imported by: 16

README

Reader

A simple library to work with io.Reader.

This package offers a convenient line reader for a specific line format.

Documentation

Index

Constants

View Source
const (
	CR = '\r'
	LF = '\n'
)

ASCII Symbols.

View Source
const ErrSizeError = "Size Error"

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

func NewReader

func NewReader(
	reader io.Reader,
) *Reader

func (*Reader) ReadBytes

func (r *Reader) ReadBytes(
	size int,
) ([]byte, error)

ReadBytes tries to read an exact Number of Bytes.

func (*Reader) ReadLineEndingWithCRLF

func (r *Reader) ReadLineEndingWithCRLF() ([]byte, error)

ReadLineEndingWithCRLF reads a Line ending exactly with the 'CR'+'LF' Symbols Sequence. The two Symbols at the End of the Line (CR+LF) are included into the returned Result.

Jump to

Keyboard shortcuts

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