reason

package
v1.0.0-alpha.21 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package reason holds the words a run states about itself: why it wrote no rows, what to do about the error its agent ended in, and the reader's error line. The runner writes them and a comment shows them, so they live apart from both.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentErrorFix

func AgentErrorFix(class adapter.AgentError) string

AgentErrorFix says what to do about an agent error of the class given, empty for a class outside the closed list.

func AgentErrorLine

func AgentErrorLine(class adapter.AgentError) string

AgentErrorLine is an agent error's class and its fix, in one line.

func ReaderLine

func ReaderLine(text string) string

ReaderLine is the first line of a reader's error, as a result object and a comment carry it. The error can quote the agent's stream, so every character outside readerLineCharacters becomes ?, and the line is cut at maxReaderLine bytes.

Types

type Reason

type Reason string

Reason says why a run wrote no rows. Its values are a closed list, each with one sentence, so a reader of an empty rows file can name the cause.

const (
	// NoUsage is a run whose agent ended and reported no usage.
	NoUsage Reason = "no_usage"
	// ConcurrentRun is a run refused before its agent started, because
	// another run held the agent's state directory.
	ConcurrentRun Reason = "concurrent_run"
	// ReaderRefused is a run whose reader refused the agent's stream or
	// its execution file, so no usage was read.
	ReaderRefused Reason = "reader_refused"
	// AgentError is a run whose agent ended in an error before it
	// reported any usage. The run's result names the error's class.
	AgentError Reason = "agent_error"
)

The reasons a run writes no rows.

func (Reason) Sentence

func (r Reason) Sentence() string

Sentence is the reason in words.

Jump to

Keyboard shortcuts

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