Documentation
¶
Index ¶
- func IsTTY() bool
- type Formatter
- func (f *Formatter) Error(format string, args ...any)
- func (f *Formatter) ErrorJSON(err error) error
- func (f *Formatter) IsJSON() bool
- func (f *Formatter) Print(data any) error
- func (f *Formatter) PrintJSON(data any) error
- func (f *Formatter) Printf(format string, args ...any)
- func (f *Formatter) Println(args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter handles JSON/human-readable output switching.
func NewFormatter ¶
NewFormatter creates a formatter with the given output mode.
Click to show internal directories.
Click to hide internal directories.