tailscale.comtailscale.com/util/lineiter Index | Files

package lineiter

import "tailscale.com/util/lineiter"

Package lineiter iterates over lines in things.

Index

Functions

func Bytes

func Bytes(bs []byte) iter.Seq[[]byte]

Bytes returns an iterator over the lines in bs. The returned substrings don't include the trailing newline. Lines may be empty.

func File

func File(name string) iter.Seq[result.Of[[]byte]]

File returns an iterator that reads lines from the named file.

The returned substrings don't include the trailing newline. Lines may be empty.

func Reader

func Reader(r io.Reader) iter.Seq[result.Of[[]byte]]

Reader returns an iterator over the lines in r.

The returned substrings don't include the trailing newline. Lines may be empty.

Source Files

lineiter.go

Version
v1.84.1 (latest)
Published
May 29, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
1 day ago

Tools for package owners.