Documentation
¶
Overview ¶
Package cmd implements the gohai CLI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute( ctx context.Context, args []string, in io.Reader, out io.Writer, errOut io.Writer, ) int
Execute runs the gohai CLI with args, the words after the binary's name, and returns the exit code: 0, or 1 after it prints the error to errOut. main.go gives it the process's arguments and streams, and a ctx that a signal cancels. A stream takes color when it is a terminal and NO_COLOR is unset.
func NewCollectorCommand ¶ added in v1.13.0
NewCollectorCommand returns the gohai collector command, with its list, get, spec get and validate subcommands, which describe and check the collectors in the binary. path is the command path that the command is mounted at, such as "gohai collector", and its examples and hints name that path. It is exported so that a program that embeds gohai, such as osapi, mounts the same commands (osapi agent collector) and prints the same output.
Types ¶
This section is empty.