lineread

package
v1.104.6 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: BSD-3-Clause Imports: 3 Imported by: 6 modules, 21 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

Overview

Package lineread reads lines from files. It's not fancy, but it got repetitive.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File(name string, fn func(line []byte) error) error

File opens name and calls fn for each line. It returns an error if the Open failed or once fn returns an error.

func Reader

func Reader(r io.Reader, fn func(line []byte) error) error

Reader calls fn for each line. If fn returns an error, Reader stops reading and returns that error. Reader may also return errors encountered reading and parsing from r. To stop reading early, use a sentinel "stop" error value and ignore it when returned from Reader.

Types

This section is empty.

Jump to

Keyboard shortcuts

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