Documentation
¶
Overview ¶
Package gh implements the "safe gh" wrapper: it parses a gh argv and reports invocations outside a narrow allowlist so the command layer can refuse them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Invocation ¶
Invocation is a gh command line split into any options that appear before the command, the command (primary resource, e.g. "pr"), the subcommand (verb, e.g. "list"), and the verb's remaining arguments.
func Parse ¶
func Parse(argv []string) Invocation
Parse splits argv into leading options, the command, the subcommand, and the subcommand's args. Leading options are kept (fail closed) so an unknown option cannot be mistaken for the command; the subcommand is the first non-option token after the command, so an option wedged before the verb cannot hide it.