cli

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug bool

Debug enables verbose debug output.

View Source
var ErrNoElements = errors.New("no elements found")

ErrNoElements indicates a selector matched no elements (informational, not an error).

View Source
var ErrNoEntriesInRange = errors.New("no entries in range")

ErrNoEntriesInRange indicates the specified range has no entries (informational, not an error).

View Source
var ErrNoMatches = errors.New("no matches found")

ErrNoMatches indicates a search found no matches (informational, not an error).

View Source
var ErrNoRules = errors.New("no rules found")

ErrNoRules indicates no CSS rules matched the selector pattern (informational, not an error).

View Source
var JSONOutput bool

JSONOutput enables JSON output format (default is text).

View Source
var NoColor bool

NoColor disables color output.

View Source
var Version = "dev"

Version is set at build time.

Functions

func Execute

func Execute() error

Execute runs the root command. Supports command abbreviation via unique prefix matching.

func ExecuteArgs

func ExecuteArgs(args []string) (recognized bool, err error)

ExecuteArgs runs a command with the given arguments. Used by the REPL to execute commands parsed from user input. Returns true if the command was recognized (even if it failed), false if unknown.

func IsPrintedError

func IsPrintedError(err error) bool

IsPrintedError returns true if the error has already been printed.

func ResetExecutorFactory

func ResetExecutorFactory()

ResetExecutorFactory resets to the default factory.

func SetExecutorFactory

func SetExecutorFactory(f ExecutorFactory)

SetExecutorFactory sets the executor factory (for testing or REPL).

Types

type DirectExecutorFactory

type DirectExecutorFactory struct {
	// contains filtered or unexported fields
}

DirectExecutorFactory creates direct executors for REPL use. It calls the daemon handler directly without IPC.

func NewDirectExecutorFactory

func NewDirectExecutorFactory(handler ipc.Handler) *DirectExecutorFactory

NewDirectExecutorFactory creates a factory that uses direct execution.

func (*DirectExecutorFactory) IsDaemonRunning

func (f *DirectExecutorFactory) IsDaemonRunning() bool

func (*DirectExecutorFactory) NewExecutor

func (f *DirectExecutorFactory) NewExecutor() (executor.Executor, error)

type ExecutorFactory

type ExecutorFactory interface {
	NewExecutor() (executor.Executor, error)
	IsDaemonRunning() bool
}

ExecutorFactory creates executors and checks daemon status.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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