Documentation
¶
Overview ¶
Package errs provides typed errors with exit codes and user-facing hints.
Index ¶
- func GetExitCode(err error) int
- type CLIError
- func AuthError(msg, hint string) *CLIError
- func ConfigError(msg, hint string) *CLIError
- func General(msg string) *CLIError
- func Generalf(format string, args ...any) *CLIError
- func NetworkError(msg string, cause error) *CLIError
- func PermissionError(msg, hint string) *CLIError
- func RateLimitError(msg, hint string) *CLIError
- func RemoteAPIError(msg string, cause error) *CLIError
- func UsageError(msg, hint string) *CLIError
- func Wrap(code int, msg string, cause error) *CLIError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetExitCode ¶
GetExitCode extracts the exit code from an error, defaulting to 1.
Types ¶
type CLIError ¶
CLIError is a structured error with an exit code and optional hint.
func ConfigError ¶
func NetworkError ¶
func PermissionError ¶
func RateLimitError ¶
func RemoteAPIError ¶
func UsageError ¶
Click to show internal directories.
Click to hide internal directories.