Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultMaxLines = 2000 DefaultMaxBytes = 50 * 1024 GrepMaxLineLength = 500 TruncatedByLines = "lines" TruncatedByBytes = "bytes" TruncatedByNothing = "" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TruncationOptions ¶
type TruncationResult ¶
type TruncationResult struct {
Content string
Truncated bool
TruncatedBy string
TotalLines int
TotalBytes int
OutputLines int
OutputBytes int
LastLinePartial bool
FirstLineExceedsLimit bool
MaxLines int
MaxBytes int
}
func TruncateHead ¶
func TruncateHead(content string, options TruncationOptions) TruncationResult
func TruncateTail ¶
func TruncateTail(content string, options TruncationOptions) TruncationResult
Click to show internal directories.
Click to hide internal directories.