commands

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorMsg = lipgloss.NewStyle().
		Foreground(pink).
		BorderStyle(lipgloss.RoundedBorder()).
		Padding(1, 2).
		BorderForeground(red)
)

Functions

func BuildCommands

func BuildCommands() map[string]Command

func SingleCommandHelp

func SingleCommandHelp(
	s *State,
	commands map[string]Command,
	cmdName string,
) error

Types

type Command

type Command struct {
	Flags       map[string]string
	Name        string
	Description string
	Callback    func(*State) error
}

type State

type State struct {
	Cfg  *config.Config
	Db   *db.Queries
	Args []string
}

Jump to

Keyboard shortcuts

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