reader

package
v0.0.0-...-1e7a838 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GroupReader

func GroupReader[T any](r io.Reader, groupF func(string) bool, parseF func(string) (T, error)) (out [][]T, err error)
func Head(r io.Reader, n int) (head bytes.Buffer, tail bytes.Buffer, err error)

func HeadFunc

func HeadFunc(r io.Reader, splitf func([]byte) bool, skipMatch bool) (head bytes.Buffer, tail bytes.Buffer, err error)

func LineReader

func LineReader(r io.Reader, f func(s string) error) (count int, err error)

Call f for each line in io.Reader

func Lines

func Lines(r io.Reader) (out []string, err error)

func URLReader

func URLReader(url string, f func(s string) error) (int, error)

Open file/url and run f for each line

func UrlOpen

func UrlOpen(arg string) (io.ReadCloser, error)

Open file or http URL

Types

This section is empty.

Jump to

Keyboard shortcuts

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