Documentation
¶
Index ¶
- Variables
- func Banner(text string) string
- func Confirm(question string, defaultYes bool) (bool, error)
- func Errorln(err error) string
- func Form(title string, fields []FormField) ([]string, error)
- func Hint(msg string) string
- func Infoln(msg string) string
- func Pick(title string, options []PickerOption) (string, error)
- func Prompt(label, placeholder, initial string, validate func(string) error) (string, error)
- func Slugify(s string) string
- func Step(format string, a ...any) string
- func Successln(msg string) string
- func ValidateSlug(s string) error
- type FormField
- type PickerOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Title = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#62d6b9")) Accent = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#f7a400")) Info = lipgloss.NewStyle().Foreground(lipgloss.Color("#7d56f4")) Error = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#f25d94")) Success = lipgloss.NewStyle().Foreground(lipgloss.Color("#2ecc71")) Dim = lipgloss.NewStyle().Foreground(lipgloss.Color("#666666")) )
Palette matches scripts/fetch-transcript and scripts/migrations.
Functions ¶
func Pick ¶
func Pick(title string, options []PickerOption) (string, error)
Pick shows a list of options and returns the chosen Label.
Types ¶
type FormField ¶
type FormField struct {
Label string
Initial string
Multi bool // true → textarea, false → single-line textinput
Required bool
}
FormField describes a single input on the PR form.
type PickerOption ¶
PickerOption is a single choice in a picker.
Click to show internal directories.
Click to hide internal directories.