filter

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Regex

func Regex(pattern string, invert bool) (func(string) bool, error)

Regex returns a line filter that matches lines against the given pattern. If invert is true, non-matching lines are kept instead.

func Truncate

func Truncate(lines []string, maxLines int) []string

Truncate applies smart truncation to a list of lines: - If lines exceed maxLines, keeps head and tail with an omission notice in between. - Merges consecutive duplicate lines into "(repeated N times)" markers. maxLines <= 0 means no truncation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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