Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandError = ""
Functions ¶
func RunCommand ¶
func RunCommand(fp string, logLeaf *StringLeaf, quitLeaf *Leaf[error])
Command: run path
func StartTui ¶
func StartTui(config *GreenTeaConfig)
Types ¶
type GreenTeaConfig ¶
type GreenTeaConfig struct {
RefreshDelay int
Commands []*cli.Command
LogLeaf *StringLeaf
QuitLeaf *Leaf[error] // once a print is added, the applecation quits with the added message
CommandLeaf *StringLeaf // runs added commands in the tui
ExitLeaf *Leaf[func()] // functions to run on exit
}
type Leaf ¶
type Leaf[T any] struct { // contains filtered or unexported fields }
func (*Leaf[T]) Harvest ¶
Returns the oldest element and true, then removes it from the leaf. Return an empty var of type T and false if leaf has no elements
func (*Leaf[T]) HarvestAll ¶
func (leaf *Leaf[T]) HarvestAll() []T
Returns all items from leaf and clears it.
type StringLeaf ¶
func (*StringLeaf) Printlnf ¶
func (leaf *StringLeaf) Printlnf(format string, a ...any)
Implements fmt.Printf() with a new line after
Click to show internal directories.
Click to hide internal directories.