Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultMaxLines = 2000 DefaultMaxBytes = 50 * 1024 // 50KB )
View Source
const ( MaxFetchBody = 10 << 20 // 10MB MaxResponseBody = 1 << 20 // 1MB )
View Source
const ( GrepMaxLineLength = 500 MaxGlobResults = 500 MaxImageSize = 20 << 20 // 20MB )
View Source
const MaxContentLength = 100_000
Variables ¶
This section is empty.
Functions ¶
func Clip ¶
Clip collapses whitespace (newlines → spaces, multiple spaces → one), then truncates to maxLen bytes at a UTF-8 boundary, appending "...".
func ClipLines ¶
ClipLines keeps at most maxLines lines, each truncated to maxWidth runes. Returns the selected lines and the count of hidden lines.
func FormatSize ¶
FormatSize returns a human-readable size string.
Types ¶
type Result ¶
type Result struct {
Content string
Truncated bool
TruncatedBy Strategy
TotalLines int
TotalBytes int
OutputLines int
OutputBytes int
FirstLineExceedsLimit bool
MaxLines int
MaxBytes int
}
Click to show internal directories.
Click to hide internal directories.