delegation

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(tool string, args ...string) *exec.Cmd

Command builds a command that routes through the grove delegator if available. If grove is not available in PATH, it falls back to direct execution of the tool.

This ensures compatibility with: - Production environments where grove manages all tools - Test environments where only individual binaries exist - Direct binary execution scenarios

Usage:

cmd := delegation.Command("flow", "plan", "status")
// Executes: grove flow plan status (if grove exists)
// Or: flow plan status (if grove doesn't exist)

cmd := delegation.Command("cx", "rules")
// Executes: grove cx rules (if grove exists)
// Or: cx rules (if grove doesn't exist)

func CommandContext

func CommandContext(ctx context.Context, tool string, args ...string) *exec.Cmd

CommandContext builds a context-aware command that routes through the grove delegator if available. If grove is not available in PATH, it falls back to direct execution of the tool.

This is similar to Command but supports context cancellation.

Usage:

cmd := delegation.CommandContext(ctx, "cx", "generate")
// Executes: grove cx generate (if grove exists)
// Or: cx generate (if grove doesn't exist)

Types

This section is empty.

Jump to

Keyboard shortcuts

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