gum

package module
v0.0.0-...-4282750 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 5 Imported by: 1

README

gum

  1. gum.Choose(...) 列表选项

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KongVars = kong.Vars{
	"defaultHeight":           "0",
	"defaultWidth":            "0",
	"defaultAlign":            "left",
	"defaultBorder":           "none",
	"defaultBorderForeground": "",
	"defaultBorderBackground": "",
	"defaultBackground":       "",
	"defaultForeground":       "",
	"defaultMargin":           "0 0",
	"defaultPadding":          "0 0",
	"defaultUnderline":        "false",
	"defaultBold":             "false",
	"defaultFaint":            "false",
	"defaultItalic":           "false",
	"defaultStrikethrough":    "false",
}

Functions

func Choose

func Choose(options []string, optionsFn ...func(*choose.Options)) ([]string, error)

func ChooseHeader

func ChooseHeader(header string) func(*choose.Options)

func ChooseLimit

func ChooseLimit(limit int) func(*choose.Options)

func ChooseTimeout

func ChooseTimeout(timeout time.Duration) func(*choose.Options)

func ChooseTimeoutValues

func ChooseTimeoutValues(timeoutValues []string) func(*choose.Options)

func Confirm

func Confirm(prompt string, optionsFn ...func(*confirm.Options) ([]string, error)) (bool, error)

func ConfirmDefault

func ConfirmDefault(defaultValue bool) func(*confirm.Options)

func ConfirmTimeout

func ConfirmTimeout(timeout time.Duration) func(*confirm.Options)

func Input

func Input(prompt string, optionsFn ...func(*input.Options)) (string, error)

func InputPlaceholder

func InputPlaceholder(placehold string) func(*input.Options)

func InputTimeout

func InputTimeout(timeout time.Duration) func(*input.Options)

func KongParse

func KongParse(cli interface{}, options ...kong.Option) *kong.Context

KongParse constructs a new parser and parses the default command-line.

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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