cli

package module
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2025 License: MIT Imports: 9 Imported by: 48

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUserAborted = huh.ErrUserAborted
View Source
var ErrUserTimeout = huh.ErrTimeout

Functions

func Confirm

func Confirm(label string, placeholder bool) (bool, error)

func Debug added in v0.0.4

func Debug(v ...any)

func Debugf added in v0.0.4

func Debugf(format string, a ...interface{})

func Error

func Error(v ...any)

func Errorf

func Errorf(format string, a ...interface{})

func Fatal

func Fatal(v ...any)

func Fatalf

func Fatalf(format string, a ...interface{})

func File

func File(label string, types []string) (string, error)

func Info

func Info(v ...interface{})

func Infof

func Infof(format string, a ...interface{})

func Input added in v0.0.3

func Input(label, placeholder string) (string, error)

func IsTerminal

func IsTerminal()

func MustConfirm

func MustConfirm(label string, placeholder bool) bool

func MustFile

func MustFile(label string, types []string) string

func MustInput added in v0.0.3

func MustInput(label, placeholder string) string

func MustRun

func MustRun(title string, fn func() error) error

func MustSelect

func MustSelect(label string, items []string) (int, string)

func MustText added in v0.0.3

func MustText(label, placeholder string) string

func OpenFile

func OpenFile(name string) error

func OpenURL

func OpenURL(url string) error

func Run

func Run(title string, fn func() error) error

func Select

func Select(label string, items []string) (int, string, error)

func ShowAppHelp

func ShowAppHelp(cmd *Command) error

func ShowCommandHelp

func ShowCommandHelp(cmd *Command) error

func Table

func Table(headers []string, rows [][]string)

func Text added in v0.0.3

func Text(label, placeholder string) (string, error)

func Title

func Title(val string)

func Warn

func Warn(v ...any)

func Warnf

func Warnf(format string, a ...interface{})

Types

type Argument

type Argument = cli.Argument

type BoolFlag

type BoolFlag = cli.BoolFlag

type Command

type Command = cli.Command

type Flag

type Flag = cli.Flag

type FloatArg

type FloatArg = cli.FloatArg

type IntArg

type IntArg = cli.IntArg

type IntFlag

type IntFlag = cli.IntFlag

type IntSliceFlag

type IntSliceFlag = cli.IntSliceFlag

type StringArg

type StringArg = cli.StringArg

type StringFlag

type StringFlag = cli.StringFlag

type StringMapArgs added in v0.0.6

type StringMapArgs = cli.StringMapArgs

type StringSliceFlag

type StringSliceFlag = cli.StringSliceFlag

type TimestampArg

type TimestampArg = cli.TimestampArg

type UintArg

type UintArg = cli.UintArg

Jump to

Keyboard shortcuts

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