linereader

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LineReader

type LineReader struct {
	Line   int64
	Offset int64
	// contains filtered or unexported fields
}

LineReader keeps track of how many lines have been read.

func New

func New(r io.Reader, startLine, startOffset int64, onNewLine func(line, offset int64)) *LineReader

New creates a new LineReader. A reader that keeps track of the line positions within the source.

func (*LineReader) Read

func (lr *LineReader) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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