liner

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package liner handles reading lines from clients that may or may not require continuation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Line added in v0.14.0

type Line struct {
	Line     []byte
	Literals map[string][]byte
}

type Liner

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

func New

func New(r io.Reader) *Liner

func (*Liner) Lines added in v0.14.0

func (l *Liner) Lines(doContinuation func() error) <-chan Line

Lines returns a channel that will receive lines as they are read.

func (*Liner) Read

func (l *Liner) Read(doContinuation func() error) ([]byte, map[string][]byte, error)

Read reads a full line, automatically reading again if the line was not complete. Each time an additional read is performed, doContinuation is called. If the callback returns an error, the operation is aborted.

func (*Liner) Reset added in v0.14.0

func (l *Liner) Reset(r io.Reader)

Reset resets the liner to read from a new reader.

Jump to

Keyboard shortcuts

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