Documentation
¶
Index ¶
- Variables
- func Confirm(label string, defaultValue bool) (bool, error)
- func Debug(v ...any)
- func Debugf(format string, a ...interface{})
- func Error(v ...any)
- func Errorf(format string, a ...interface{})
- func Fatal(v ...any)
- func Fatalf(format string, a ...interface{})
- func File(label string, types []string) (string, error)
- func Info(v ...interface{})
- func Infof(format string, a ...interface{})
- func Input(label, placeholder string) (string, error)
- func IsTerminal() bool
- func MustConfirm(label string, defaultValue bool) bool
- func MustFile(label string, types []string) string
- func MustInput(label, placeholder string) string
- func MustRun(title string, fn func() error) error
- func MustSelect(label string, items []string) (int, string)
- func MustText(label, placeholder string) string
- func OpenFile(name string) error
- func OpenURL(url string) error
- func Run(title string, fn func() error) error
- func Select(label string, items []string) (int, string, error)
- func SetDarkTheme()
- func SetLightTheme()
- func SetTheme(theme Theme)
- func ShowAppHelp(cmd *Command) error
- func ShowCommandHelp(cmd *Command) error
- func Table(headers []string, rows [][]string)
- func Text(label, placeholder string) (string, error)
- func Title(val string)
- func Warn(v ...any)
- func Warnf(format string, a ...interface{})
- type Argument
- type BoolFlag
- type Command
- type Flag
- type FloatArg
- type IntArg
- type IntFlag
- type IntSliceFlag
- type RGB
- type StringArg
- type StringFlag
- type StringMapArgs
- type StringSliceFlag
- type Theme
- type TimestampArg
- type UintArg
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUserAborted = errors.New("user aborted")
View Source
var Latte = Theme{ Rosewater: Hex("#dc8a78"), Flamingo: Hex("#dd7878"), Pink: Hex("#ea76cb"), Mauve: Hex("#8839ef"), Red: Hex("#d20f39"), Maroon: Hex("#e64553"), Peach: Hex("#fe640b"), Yellow: Hex("#df8e1d"), Green: Hex("#40a02b"), Teal: Hex("#179299"), Sky: Hex("#04a5e5"), Sapphire: Hex("#209fb5"), Blue: Hex("#1e66f5"), Lavender: Hex("#7287fd"), Text: Hex("#4c4f69"), Subtext1: Hex("#5c5f77"), Subtext0: Hex("#6c6f85"), Overlay2: Hex("#7c7f93"), Overlay1: Hex("#8c8fa1"), Overlay0: Hex("#9ca0b0"), Surface2: Hex("#acb0be"), Surface1: Hex("#bcc0cc"), Surface0: Hex("#ccd0da"), Base: Hex("#eff1f5"), Mantle: Hex("#e6e9ef"), Crust: Hex("#dce0e8"), }
Catppuccin Latte (light theme)
View Source
var Mocha = Theme{ Rosewater: Hex("#f5e0dc"), Flamingo: Hex("#f2cdcd"), Pink: Hex("#f5c2e7"), Mauve: Hex("#cba6f7"), Red: Hex("#f38ba8"), Maroon: Hex("#eba0ac"), Peach: Hex("#fab387"), Yellow: Hex("#f9e2af"), Green: Hex("#a6e3a1"), Teal: Hex("#94e2d5"), Sky: Hex("#89dceb"), Sapphire: Hex("#74c7ec"), Blue: Hex("#89b4fa"), Lavender: Hex("#b4befe"), Text: Hex("#cdd6f4"), Subtext1: Hex("#bac2de"), Subtext0: Hex("#a6adc8"), Overlay2: Hex("#9399b2"), Overlay1: Hex("#7f849c"), Overlay0: Hex("#6c7086"), Surface2: Hex("#585b70"), Surface1: Hex("#45475a"), Surface0: Hex("#313244"), Base: Hex("#1e1e2e"), Mantle: Hex("#181825"), Crust: Hex("#11111b"), }
Catppuccin Mocha (dark theme)
Functions ¶
func IsTerminal ¶
func IsTerminal() bool
func MustConfirm ¶
func SetDarkTheme ¶ added in v0.0.11
func SetDarkTheme()
SetDarkTheme sets the theme to Catppuccin Mocha
func SetLightTheme ¶ added in v0.0.11
func SetLightTheme()
SetLightTheme sets the theme to Catppuccin Latte
func ShowAppHelp ¶
func ShowCommandHelp ¶
Types ¶
type IntSliceFlag ¶
type IntSliceFlag = cli.IntSliceFlag
type RGB ¶ added in v0.0.11
type RGB struct {
R, G, B uint8
}
RGB represents an RGB color
type StringFlag ¶
type StringFlag = cli.StringFlag
type StringMapArgs ¶ added in v0.0.6
type StringMapArgs = cli.StringMapArgs
type StringSliceFlag ¶
type StringSliceFlag = cli.StringSliceFlag
type Theme ¶ added in v0.0.11
type Theme struct {
// Base colors
Rosewater RGB
Flamingo RGB
Pink RGB
Mauve RGB
Red RGB
Maroon RGB
Peach RGB
Yellow RGB
Green RGB
Teal RGB
Sky RGB
Sapphire RGB
Blue RGB
Lavender RGB
// Text colors
Text RGB
Subtext1 RGB
Subtext0 RGB
// Overlay colors
Overlay2 RGB
Overlay1 RGB
Overlay0 RGB
// Surface colors
Surface2 RGB
Surface1 RGB
Surface0 RGB
// Background colors
Base RGB
Mantle RGB
Crust RGB
}
Theme represents a color theme
type TimestampArg ¶
type TimestampArg = cli.TimestampArg
Source Files
¶
Click to show internal directories.
Click to hide internal directories.