Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultMaxLines = 2000 DefaultMaxBytes = 50 * 1024 GrepMaxLineLength = 500 )
Variables ¶
This section is empty.
Functions ¶
func FormatSize ¶
Types ¶
type LineResult ¶
func TruncateLine ¶
func TruncateLine(line string, maxChars ...int) LineResult
type Options ¶
type Options struct {
MaxLines *int `json:"maxLines,omitempty"`
MaxBytes *int `json:"maxBytes,omitempty"`
}
Options uses pointers because zero is an upstream-visible limit, while nil means the option was omitted and selects the default.
type Result ¶
type Result struct {
Content string `json:"content"`
Truncated bool `json:"truncated"`
TruncatedBy *Reason `json:"truncatedBy"`
TotalLines int `json:"totalLines"`
TotalBytes int `json:"totalBytes"`
OutputLines int `json:"outputLines"`
OutputBytes int `json:"outputBytes"`
LastLinePartial bool `json:"lastLinePartial"`
FirstLineExceedsLimit bool `json:"firstLineExceedsLimit"`
MaxLines int `json:"maxLines"`
MaxBytes int `json:"maxBytes"`
}
func TruncateHead ¶
func TruncateTail ¶
Click to show internal directories.
Click to hide internal directories.