cli

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 35 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

Overview

Package cli is cchp's command tree. CCHP owns the Cobra root; operations run through the runner and its embedded Restish engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string, stdio IO, build BuildInfo) int

Run executes cchp with args (without the program name) and returns the exit code.

Types

type BuildInfo

type BuildInfo struct {
	Version string
	Commit  string
	Date    string
}

BuildInfo is stamped at release time.

type IO

type IO struct {
	In  io.Reader
	Out io.Writer
	Err io.Writer
	// OutTTY and InTTY tell whether stdout and stdin are terminals.
	OutTTY bool
	InTTY  bool
	// Width is the terminal width for wrapping messages; 0 leaves lines whole.
	Width int
}

IO is where a run reads and writes.

func StdIO

func StdIO() IO

StdIO returns the process streams.

Jump to

Keyboard shortcuts

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