exitcode

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package exitcode is the one place an error becomes a process status.

forge's agent verbs print a document whose exit_code is "exactly the status the process will exit with". That promise holds only if the document's stamp and the process's os.Exit read the SAME resolution, so both call Of. A host that embeds forge (reliant forge) must call it too: exiting 1 for every error discards the 2 ("could not look") a gate branches on.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Of

func Of(err error) int

Of is the process status err produces: 0 for nil; the code of the first error in the chain that reports a non-zero ExitCode() int; otherwise 1, "we looked, and it is wrong". An unclassified failure is never 2: that is the one answer CI treats as retryable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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