Documentation ¶ Index ¶ func Regex(pattern string, invert bool) (func(string) bool, error) func Truncate(lines []string, maxLines int) []string 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. Source Files ¶ View all Source files regex.gotruncate.go Click to show internal directories. Click to hide internal directories.