Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Formatter ¶
type Formatter interface {
// Format writes v to the output stream.
Format(w io.Writer, v any) error
// FormatError writes a structured error to the output stream.
FormatError(w io.Writer, code string, message string, hint string) error
}
Formatter renders structured data to an output stream.
type JSONFormatter ¶
type JSONFormatter struct{}
JSONFormatter outputs data as indented JSON.
func (*JSONFormatter) FormatError ¶
type TextFormatter ¶
type TextFormatter struct{}
TextFormatter outputs data as human-readable text.
func (*TextFormatter) FormatError ¶
Click to show internal directories.
Click to hide internal directories.