commands

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmojiEnabled = true
View Source
var StyleGrass = lipgloss.NewStyle().
	Background(lipgloss.Color("#7a563b")).
	Border(grassBorder, true, false, false, false).
	BorderForeground(lipgloss.Color("#63a73c")).
	Padding(0, 2)
View Source
var StyleInfoBox = lipgloss.NewStyle().
	MarginTop(1).
	Bold(true).
	Foreground(lipgloss.AdaptiveColor{Light: "#00174c", Dark: "#e7d5ff"}).
	Border(lipgloss.NormalBorder(), false, false, false, true).
	BorderLeftForeground(lipgloss.Color("#5e5eff")).
	Padding(1, 1)
View Source
var StyleWarnBox = lipgloss.NewStyle().
	MarginTop(1).
	Bold(true).
	Foreground(lipgloss.AdaptiveColor{Light: "#774d00", Dark: "#ffe5d5"}).
	Border(lipgloss.NormalBorder(), false, false, false, true).
	BorderLeftForeground(lipgloss.Color("#ffb837")).
	Padding(0, 1)

Functions

func Emoji

func Emoji(e string) string

Emoji returns the given string (usually a emoji) if the current terminal (probably) supports it

func EmojiSupported

func EmojiSupported() bool

func ErrorBox

func ErrorBox(errorString string, helpText string) string

Types

type CliError

type CliError struct {
	Text        string
	Code        string
	Suggestions []string
	Help        string
}

CliError is an error that might get displayed to the user

func (*CliError) Error

func (e *CliError) Error() string

func (*CliError) RichError

func (e *CliError) RichError() string

type Command

type Command struct {
	*cobra.Command
	// contains filtered or unexported fields
}

func New

func New(cmd *cobra.Command, run Runner) *Command

type Runner

type Runner interface {
	RunE(cmd *cobra.Command, args []string) error
}

Jump to

Keyboard shortcuts

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