Documentation ¶
Index ¶
- Variables
- func Choice(sources []string, out io.Writer) stringdeprecated
- func ChoiceMulti(sources []string, out io.Writer) []stringdeprecated
- func Choose(sources []string, out io.Writer) intdeprecated
- func ChooseMulti(sources []string, out io.Writer) []intdeprecated
- func Print(ctx context.Context, nodes []string, out io.Writer) booldeprecated
- func PrintNoLastLineFeed(ctx context.Context, nodes []string, offset int, out io.Writer) (bool, int, int)deprecated
- func PrintX(ctx context.Context, nodes []string, out io.Writer) error
- func SelectIndex(sources []string, multi bool, out io.Writer) ([]int, error)
- func SelectIndexContext(ctx context.Context, sources []string, multi bool, out io.Writer) ([]int, error)
- func SelectString(sources []string, multi bool, out io.Writer) ([]string, error)
- func SelectStringContext(ctx context.Context, sources []string, multi bool, out io.Writer) ([]string, error)
- type Box
- func New() *Boxdeprecated
- func NewBox() (*Box, error)
- func (b *Box) Close() error
- func (b *Box) Print(ctx context.Context, nodes []string, offset int, out io.Writer) (bool, int, int)deprecated
- func (b *Box) PrintNoLastLineFeed(ctx context.Context, nodes []string, offset int, out io.Writer) (bool, int, int)deprecated
- func (b *Box) PrintNoLastLineFeedX(ctx context.Context, nodes []string, offset int, out io.Writer) (int, int, error)
- func (b *Box) PrintX(ctx context.Context, nodes []string, offset int, out io.Writer) (int, int, error)
- func (b *Box) SelectIndex(sources []string, multi bool, out io.Writer) ([]int, error)
- func (b *Box) SelectIndexContext(ctx context.Context, sources []string, multi bool, out io.Writer) ([]int, error)
- func (b *Box) SelectString(sources []string, multi bool, out io.Writer) ([]string, error)
- func (b *Box) SelectStringContext(ctx context.Context, sources []string, multi bool, out io.Writer) ([]string, error)
- type BoxTdeprecated
Constants ¶
This section is empty.
Variables ¶
View Source
var AnsiCutter = regexp.MustCompile("\x1B[^a-zA-Z]*[A-Za-z]")
Functions ¶
func ChoiceMulti
deprecated
func ChooseMulti
deprecated
func SelectIndex ¶ added in v2.2.0
SelectIndex returns the indexes that user selected.
func SelectIndexContext ¶ added in v2.2.1
func SelectString ¶ added in v2.2.0
SelectString returns the strings that user selected.
Types ¶
type Box ¶ added in v2.2.0
type Box struct {
// contains filtered or unexported fields
}
func (*Box) PrintNoLastLineFeedX ¶ added in v2.2.0
func (b *Box) PrintNoLastLineFeedX(ctx context.Context, nodes []string, offset int, out io.Writer) (int, int, error)
PrintNoLastLineFeedX outputs items in a tabular format, but removes the last line feed
func (*Box) PrintX ¶ added in v2.2.0
func (b *Box) PrintX(ctx context.Context, nodes []string, offset int, out io.Writer) (int, int, error)
PrintX outputs items in a tabular format
func (*Box) SelectIndex ¶ added in v2.2.0
SelectIndex returns the indexes that user selected.
func (*Box) SelectIndexContext ¶ added in v2.2.1
func (*Box) SelectString ¶ added in v2.2.0
SelectString returns the strings that user selected.
Click to show internal directories.
Click to hide internal directories.