command

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package command implements the WireHop command-line interface.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUsage indicates missing or inconsistent invocation configuration.
	ErrUsage = errors.New("invalid command usage")
)

Functions

func Execute

func Execute(ctx context.Context, args []string, getenv func(string) string, stdout, stderr io.Writer) int

Execute runs the command, renders one diagnostic on failure, and returns a process exit code.

func HostEnvironment

func HostEnvironment(name string) string

HostEnvironment returns the current process environment value for name.

func Run

func Run(ctx context.Context, args []string, getenv func(string) string, stdout, stderr io.Writer) error

Run executes one WireHop subcommand.

Types

This section is empty.

Jump to

Keyboard shortcuts

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