Documentation
¶
Overview ¶
Package cli is the flagnetic command line. Its entry takes everything a process gets from outside (arguments, environment, output streams and signals) as parameters, so tests run every command in-process.
Exit codes: 0 success, 1 a runtime failure, 2 a usage or configuration error, so tooling can tell a bad deploy from a crash.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Main ¶
func Main(args []string, lookupEnv func(string) (string, bool), stdout, stderr io.Writer, signals <-chan os.Signal, opts ...Option) int
Main runs the command named by args[0] and returns the process's exit code. lookupEnv reads the environment, as os.LookupEnv does; a value on signals asks the command to stop.
Types ¶
Click to show internal directories.
Click to hide internal directories.