Documentation
¶
Index ¶
- func API(message string, cause error) error
- func Auth(message string) error
- func ExitCode(err error) int
- func Forbidden(message string) error
- func Network(err error) error
- func NotFound(resource, identifier string) error
- func Usage(message, hint string) error
- func WithData(err error, data any) error
- func WithRenderedData(err error, data any) error
- func WriteJSON(w io.Writer, value any) error
- type HumanRenderable
- type MarkdownRenderable
- type Options
- type RichError
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithRenderedData ¶
WithRenderedData attaches structured error data and uses its human rendering as the complete error output in human mode. JSON modes retain the standard error envelope and include the data under the data key.
Types ¶
type HumanRenderable ¶
type HumanRenderable interface {
HumanText() string
}
type MarkdownRenderable ¶
type MarkdownRenderable interface {
MarkdownText() string
}
type RichError ¶
type RichError struct {
Base *baseoutput.Error
Data any
}
Click to show internal directories.
Click to hide internal directories.