Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunWithInput ¶
func RunWithInput(w io.Writer, input string, args []string, opts Options, registry *CommandRegistry) error
RunWithInput executes a pipeline with initial input
Types ¶
type CommandRegistry ¶
CommandRegistry holds references to available commands
func NewRegistry ¶
func NewRegistry(rootCmd *cobra.Command) *CommandRegistry
NewRegistry creates a new command registry
type CommandResult ¶
type CommandResult struct {
Command string `json:"command"`
Output string `json:"output,omitempty"`
Error string `json:"error,omitempty"`
}
CommandResult represents a single command's execution
type Options ¶
type Options struct {
JSON bool // --json: output pipeline result as JSON
Separator string // --sep: command separator (default "|")
Verbose bool // --verbose: show intermediate steps
VarName string // --var: variable name for output substitution (default "OUT")
}
Options configure the pipe command behavior
Click to show internal directories.
Click to hide internal directories.