prune

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMarker   = "[memoh pruned]"
	DefaultMaxBytes = 10 * 1024
	DefaultMaxLines = 250
)

Variables

This section is empty.

Functions

func CountLines

func CountLines(s string) int

func Exceeds

func Exceeds(s string, maxBytes, maxLines int) bool

func PruneWithEdges

func PruneWithEdges(s, label string, cfg Config) string

Types

type Config

type Config struct {
	MaxBytes  int
	MaxLines  int
	HeadBytes int
	TailBytes int
	HeadLines int
	TailLines int
	Marker    string
}

Jump to

Keyboard shortcuts

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