optio

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Line Scanner with minimized copying. We wish we'd do a circular buffer and readv() into it but that's not available in Go (outside of linux for some reason despite posix).

Index

Constants

This section is empty.

Variables

View Source
var ErrNoEOL = errors.New("no EOL found within maximum line length")

Functions

This section is empty.

Types

type SlidingBuffer

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

func LineScanner

func LineScanner(f io.Reader, bufferSize, readSize, maxLineLength int) *SlidingBuffer

func (*SlidingBuffer) EOF

func (sb *SlidingBuffer) EOF() bool

func (*SlidingBuffer) Line

func (sb *SlidingBuffer) Line() ([]byte, error)

Jump to

Keyboard shortcuts

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