tui

package
v3.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2026 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBack 用户按下 Esc 要求返回上一级
	ErrBack = errors.New("back")
	// ErrAbort 用户按下 Ctrl+C 或上下文已取消,要求退出
	ErrAbort = errors.New("abort")
)

Functions

func Run

func Run(ctx context.Context, t *gotext.Locale, root *cli.Command, exec func(context.Context, []string) error) error

Run 交互式驱动命令树:逐级选择命令、填写参数后交给 exec 执行,Esc 返回上一级,Ctrl+C 退出

Types

type Item

type Item struct {
	Label string
	Desc  string
}

Item 列表项,Desc 以灰色显示在标签之后

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL