Documentation
¶
Overview ¶
Package cli is the gotools command line on urfave/cli v3: an App with one entry point, Run(ctx, args), that serves the commands declared in package command.
The App turns each command's declaration (name, summary, prose, examples, flags) into a urfave/cli command and its help, hands the command a Context built from the App's streams, environment and seams, and runs its PreRun, Run and PostRun. Nothing here is global, so a test builds its own App with in-memory streams and fakes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Program string // the name used in usage text, e.g. "gotools"
Version string
Stdin io.Reader // os.Stdin when nil
Stdout, Stderr io.Writer // os.Stdout and os.Stderr when nil
Environ []string // NAME=value pairs; os.Environ when nil
WorkDir string // os.Getwd when empty
Go gocmd.Runner
// Commands are the commands served; command.All when nil.
Commands []command.Command
// contains filtered or unexported fields
}
App is the command line. The zero value of every field but Program has a default.
Click to show internal directories.
Click to hide internal directories.