Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Println ¶
Println outputs the given items in a tabular layout and appends a newline after the final line.
func SelectIndex ¶
SelectIndex returns the indexes that user selected.
Types ¶
type Box ¶
type Box struct {
grid.Grid
ttyadapter.Tty
}
func New ¶
New creates and initializes a Box using the default terminal backend (tty8pe). It is equivalent to creating a Box with &tty8pe.Tty{} and calling Open().
Example:
b, err := box.New()
if err != nil {
log.Fatal(err)
}
defer b.Close()
Use this function when you do not need to customize the terminal input.
func (*Box) Open ¶
Open initializes the Box with the terminal backend assigned to b.Tty. This method is used when you want to provide a custom TTY implementation instead of the default one created by New().
Example:
import "github.com/nyaosorg/go-ttyadapter/auto"
b := &box.Box{
Tty: &auto.Pilot{Text: []string{"l", "l", "\r"}},
}
if err := b.Open(); err != nil {
log.Fatal(err)
}
defer b.Close()
func (*Box) SelectIndex ¶
SelectIndex returns the indexes that user selected.
Click to show internal directories.
Click to hide internal directories.
