Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Output = io.Writer(os.Stderr)
Output is the Writer where help and errors are printed with regards to command line parsing. It is os.Stderr by default. It should be set before Run.
Functions ¶
func ArgError ¶
ArgError is used to wrap an error returned from CommandFunc, in order to signal that the error should be regarded as a command line validation issue. If the error returned by CommandFunc is wrapped like this, help will be printed.
func NewFlagSet ¶
NewFlagSet creates a new FlagSet with ContinueOnError, and Usage set directly to PrintDefaults.
Types ¶
type CommandFunc ¶
type CommandFunc func() error
Click to show internal directories.
Click to hide internal directories.