Help us shape the future of Go! Take the 2026 Go Developer Survey

jsonl

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteFileJSONL

func WriteFileJSONL(w io.Writer, r common.FileResult) error

WriteFileJSONL encodes r as a single compact JSON line to w.

func WriteJSONL

func WriteJSONL(w io.Writer, r common.Result) error

WriteJSONL encodes r as a single compact JSON line (terminated by '\n') to w.

func WriteRepoJSONL

func WriteRepoJSONL(w io.Writer, r common.RepoResult) error

WriteRepoJSONL encodes r as a single compact JSON line to w.

func WriteWorktreeJSONL added in v0.4.0

func WriteWorktreeJSONL(w io.Writer, r common.WorktreeResult) error

WriteWorktreeJSONL encodes r as a single compact JSON line to w.

Types

type FileJSONLExecutor

type FileJSONLExecutor struct {
	MaxProcs int
	FailFast bool
	Timeout  time.Duration
	Out      io.Writer
}

FileJSONLExecutor runs Tasks concurrently (bounded by MaxProcs), parses each line of stdout as a relative file path, and writes one JSONL FileResult line per file.

func (*FileJSONLExecutor) Run

func (e *FileJSONLExecutor) Run(ctx context.Context, tasks []common.Task) error

Run executes all tasks and emits a FileResult per output line.

type JSONLExecutor

type JSONLExecutor struct {
	MaxProcs int
	FailFast bool
	Timeout  time.Duration
	Out      io.Writer
}

JSONLExecutor runs Tasks concurrently (bounded by MaxProcs), captures each task's stdout and stderr, and writes one JSONL Result line to Out per task.

Non-zero exit codes from the executed process are recorded in Result.ExitCode and do NOT cause Run to return an error — they are treated as data. Run returns an error when context is cancelled, writing to Out fails, or when FailFast is true and a task fails.

func (*JSONLExecutor) Run

func (e *JSONLExecutor) Run(ctx context.Context, tasks []common.Task) error

Run executes all tasks and blocks until they complete. When FailFast is true, the first error cancels context and halts remaining tasks.

Jump to

Keyboard shortcuts

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