Documentation
¶
Index ¶
- Variables
- func ActiveTheme() string
- func Banner() string
- func CertBox(width int, lines ...string) string
- func CheckUpdate() string
- func ForceTheme(name string)
- func RenderHelp(title string, sections []HelpSection) string
- func ResultBox(success bool, title string, lines ...string) string
- type FilePicker
- type HelpEntry
- type HelpSection
Constants ¶
This section is empty.
Variables ¶
var ( ColorCyan lipgloss.Color ColorMagenta lipgloss.Color ColorGreen lipgloss.Color ColorRed lipgloss.Color ColorYellow lipgloss.Color ColorDim lipgloss.Color TitleStyle lipgloss.Style SubtitleStyle lipgloss.Style DimStyle lipgloss.Style ActiveStyle lipgloss.Style InactiveStyle lipgloss.Style SeparatorStyle lipgloss.Style DescStyle lipgloss.Style SuccessStyle lipgloss.Style ErrorStyle lipgloss.Style WarnStyle lipgloss.Style BoxStyle lipgloss.Style )
var Version = "dev"
Version is set at build time via ldflags by GoReleaser. Falls back to "dev" when built locally without ldflags.
Functions ¶
func CheckUpdate ¶
func CheckUpdate() string
CheckUpdate queries the GitHub API for the latest release. Returns the update message to display, or empty string if up to date. Never blocks longer than 2 seconds; errors are silently ignored.
func ForceTheme ¶
func ForceTheme(name string)
ForceTheme overrides autodetection. Accepts "dark" or "light". Any other value is ignored.
func RenderHelp ¶
func RenderHelp(title string, sections []HelpSection) string
RenderHelp builds a bordered help box from sections.
Usage:
if m.showHelp {
return ui.RenderHelp("Inspect — Help", []ui.HelpSection{...})
}
Types ¶
type FilePicker ¶
type FilePicker struct {
Prompt string
Selected string
Done bool
// contains filtered or unexported fields
}
func NewFilePicker ¶
func NewFilePicker(prompt string, patterns ...string) FilePicker
NewFilePicker is a generic constructor. The patterns arg is a list of filename glob patterns (matched with filepath.Match against the filename).
func NewPrivateKeyPicker ¶
func NewPrivateKeyPicker(prompt string) FilePicker
NewPrivateKeyPicker matches SSH private key filenames (excludes *.pub).
func NewSSHCertPicker ¶
func NewSSHCertPicker(prompt string) FilePicker
NewSSHCertPicker matches SSH certificate filenames.
func NewSSHKeyPicker ¶
func NewSSHKeyPicker(prompt string) FilePicker
NewSSHKeyPicker matches any SSH key-related filename (public or private).
func (FilePicker) Init ¶
func (fp FilePicker) Init() tea.Cmd
func (FilePicker) Update ¶
func (fp FilePicker) Update(msg tea.Msg) (FilePicker, tea.Cmd)
func (FilePicker) View ¶
func (fp FilePicker) View() string
type HelpSection ¶
HelpSection groups related help entries under a heading.
func CommonHelp ¶
func CommonHelp() HelpSection
CommonHelp returns entries shared across every screen.