Documentation ¶
Overview ¶
Package gocli is a CLI library that provides subcommand handling, tidy usage and version printing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cli ¶
type Cli struct { // Name is the cli name Name string // Version is the cli version Version string // Description is the cli description Description string // Commands contains the subcommand list of the cli Commands map[string]string // SubCommand contains the runtime subcommand SubCommand string // SubCommandArgs contains the args of the runtime subcommand SubCommandArgs []string // SubCommandArgsMap contains the args of the runtime subcommand as mapped SubCommandArgsMap map[string]string // Flags contains flags Flags map[string]string // LogOut is logger for stdout LogOut *log.Logger // LogErr is logger for stderr LogErr *log.Logger }
Cli represent command line interface
func (Cli) PrintUsage ¶
func (cl Cli) PrintUsage()
PrintUsage prints usage info Usage format follows common convention for Go apps
func (Cli) PrintVersion ¶
PrintVersion prints version information
Click to show internal directories.
Click to hide internal directories.