Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultMaxLines = 2000 DefaultMaxBytes = 50 * 1024 GrepMaxLineLength = 500 TruncatedByLines = "lines" TruncatedByBytes = "bytes" TruncatedByNothing = "" )
Variables ¶
This section is empty.
Functions ¶
func SanitizeBinaryOutput ¶ added in v0.82.0
Types ¶
type ShellCaptureOptions ¶ added in v0.82.0
type ShellCaptureProgress ¶ added in v0.82.0
type ShellCaptureProgress struct {
Output string
Truncation TruncationResult
FullOutputPath string
LastLineBytes int
}
type ShellCaptureResult ¶ added in v0.82.0
type ShellCaptureResult struct {
ShellCaptureProgress
ExitCode *int
Cancelled bool
ExecutionError *harnessenv.ExecutionError
}
func ExecuteShellWithCapture ¶ added in v0.82.0
func ExecuteShellWithCapture(ctx context.Context, env harnessenv.ExecutionEnv, command string, options ShellCaptureOptions) (ShellCaptureResult, error)
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.