Documentation
¶
Overview ¶
Package errs classifies errors into categories that determine exit codes and user-facing hints. Each Category maps to a distinct exit code so that callers can distinguish internal bugs from user mistakes, environment failures, and content problems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advised ¶
type Advised interface {
NextAction() string
}
Advised is implemented by errors that can suggest a remediation step.
type Categorized ¶
type Categorized interface {
Category() Category
}
Categorized is implemented by errors that know their own Category.
type Category ¶
type Category int
Category classifies an error into one of four buckets that drive the process exit code and user-facing messaging.
const ( // CategoryInternal indicates an unexpected bug inside diffah itself. CategoryInternal Category = iota // CategoryUser indicates the caller provided invalid arguments or flags. CategoryUser // CategoryEnvironment indicates an external factor (network, filesystem, // auth) prevented the operation from succeeding. CategoryEnvironment // CategoryContent indicates the input data (image, bundle, sidecar) is // malformed or incompatible. CategoryContent )
Click to show internal directories.
Click to hide internal directories.