sentinel

package
v0.36.4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error string

Error is a constant error this command fails on: comparable, so errors.Is answers on identity, and declarable in a const block, so no package variable is mutable in the meantime.

const (
	// ErrUsage is a command line that does not make sense.
	ErrUsage Error = "incorrect usage"

	// ErrDiagnostics is a run whose findings reached the severity -fail-on names.
	ErrDiagnostics Error = "reported findings reached the -fail-on threshold"

	// ErrInvalidSpec is a document that -validate found invalid.
	ErrInvalidSpec Error = "the specification is not valid"
)

What the command refuses, and what it reports about a document it did produce.

Sentinel values are used to decide the exit status, by asking which kind of refusal was met, so that a shell can tell "the scan failed" from "the scan is fine and you asked me to be strict about it".

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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