verify

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout     = 2 * time.Minute
	MaximumTimeout     = 10 * time.Minute
	DefaultOutputLimit = 32 * 1024
	MaximumOutputLimit = 1024 * 1024

	TimeoutExitCode     = 124
	ZeroMatchExitCode   = 126
	InterruptedExitCode = 130
)

Variables

This section is empty.

Functions

func CommandDigest

func CommandDigest(request Request) (string, error)

CommandDigest returns the canonical identity of the exact argv or explicit shell command that Run will execute.

Types

type Request

type Request struct {
	Dir         string
	Argv        []string
	Shell       string
	Timeout     time.Duration
	OutputLimit int
}

func ParseCommand

func ParseCommand(authored string) (Request, error)

ParseCommand preserves authored argv unless shell semantics are explicit.

type Result

type Result struct {
	CommandDigest   string `json:"command_digest"`
	StartedAt       string `json:"started_at"`
	EndedAt         string `json:"ended_at"`
	ExitCode        int    `json:"exit_code"`
	Passed          bool   `json:"passed"`
	TimedOut        bool   `json:"timed_out"`
	Interrupted     bool   `json:"interrupted"`
	NonVacuous      bool   `json:"non_vacuous"`
	GoRunSelector   bool   `json:"go_run_selector"`
	ZeroMatch       bool   `json:"zero_match"`
	StdoutDigest    string `json:"stdout_digest"`
	StderrDigest    string `json:"stderr_digest"`
	StdoutExcerpt   string `json:"stdout_excerpt,omitempty"`
	StderrExcerpt   string `json:"stderr_excerpt,omitempty"`
	StdoutTruncated bool   `json:"stdout_truncated"`
	StderrTruncated bool   `json:"stderr_truncated"`
}

func Run

func Run(ctx context.Context, request Request) (Result, error)

Jump to

Keyboard shortcuts

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