Documentation
¶
Overview ¶
Package output renders results and errors as text or JSON and defines exit codes.
Index ¶
Constants ¶
View Source
const ( ExitOK = 0 ExitUnexpected = 1 ExitUsage = 2 ExitAuth = 3 ExitConflict = 4 ExitNotFound = 5 ExitForbidden = 6 ExitNetwork = 7 )
Variables ¶
This section is empty.
Functions ¶
func WriteError ¶
WriteError renders the error envelope.
func WriteFields ¶
WriteFields prints aligned "key: value" lines for text mode.
Types ¶
type Error ¶
type Error struct {
Code string `json:"code"`
Source string `json:"source,omitempty"`
Stage string `json:"stage,omitempty"`
Cause string `json:"cause,omitempty"`
Recovery string `json:"recovery,omitempty"`
Exit int `json:"-"`
}
Error is the stable error envelope. Cause must never contain secrets.
Click to show internal directories.
Click to hide internal directories.