Documentation ¶
Index ¶
- Variables
- func PropHint[T any](p Prop, name PropHintName, defaultValue T) T
- func Register(format Format, writer Writer)
- func Write(format Format, writer io.Writer, hints Hints, data ...any) error
- type Format
- type Hints
- type OutputMode
- type Prop
- type PropHintFunc
- type PropHintName
- type Registry
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownFormat = errors.New("unknown format")
Functions ¶
func PropHint ¶
func PropHint[T any](p Prop, name PropHintName, defaultValue T) T
Types ¶
type Hints ¶
type Hints struct { Props []Prop OutputMode OutputMode }
type OutputMode ¶
type OutputMode string
const ( OutputModeWide OutputMode = "wide" OutputModeCompact OutputMode = "compact" )
type Prop ¶
type Prop struct {
// contains filtered or unexported fields
}
func NewProp ¶
func NewProp(name, label string, funcs ...PropHintFunc) Prop
type PropHintFunc ¶
type PropHintFunc func() (PropHintName, any)
func WithPropHint ¶
func WithPropHint(name PropHintName, value any) PropHintFunc
type PropHintName ¶
type PropHintName string
Click to show internal directories.
Click to hide internal directories.