Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cli ¶
Cli parses the given arguments and then executes the appropriate subcommand.
We use this function instead of kong.Parse() so that we can pass in the arguments to parse. This allows us to more easily test the cli subcommands, and could later ease e.g. WASM usage.
XXX note how gitea/tea does this, also uses urfave instead of kong
Types ¶
type CliConfig ¶
type CliConfig struct { // Name is the name of the program Name string // Description is a short description of the program Description string // Version is the version of the program Version string // Exit is the function to call to exit the program Exit func(int) Stdin io.Reader Stdout io.Writer Stderr io.Writer }
CliConfig contains the configuration for grokker's cli
func NewCliConfig ¶
func NewCliConfig() *CliConfig
NewCliConfig returns a new Config struct with default values populated
Click to show internal directories.
Click to hide internal directories.