cli

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MPL-2.0 Imports: 28 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 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