ircreader

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: ISC Imports: 3 Imported by: 5 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrReadQ = errors.New("readQ exceeded (read too many bytes without terminating newline)")
)

Functions

This section is empty.

Types

type Reader

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

func NewIRCReader

func NewIRCReader(conn io.Reader) *Reader

Returns a new *Reader with sane buffer size limits.

func (*Reader) Initialize

func (cc *Reader) Initialize(conn io.Reader, initialSize, maxSize int)

"Placement new" for a Reader; initializes it with custom buffer size limits.

func (*Reader) ReadLine

func (cc *Reader) ReadLine() ([]byte, error)

Blocks until a full IRC line is read, then returns it. Accepts either \n or \r\n as the line terminator (but not \r in isolation). Passes through errors from the underlying connection. Returns ErrReadQ if the buffer limit was exceeded without a terminating \n.

Jump to

Keyboard shortcuts

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