package
0.0.0-20200617165101-8702c8e4ce7a
Repository: https://github.com/rancher/spur.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

Apply will attempt to apply generic flag values to a flagset.
ApplyInputSourceValue will attempt to apply an input source to a generic flag.
ApplyInputSourceValues iterates over all provided flags and executes ApplyInputSourceValue on each flag to apply an alternate input source.
DefaultAppComplete prints the list of subcommands as the default app completion method.
No description provided by the author
Exit wraps a message and exit code into an error, which by default is handled with a call to os.Exit during default error handling.
FlagNames returns the name and aliases for a given flag, and panics if any of the values are invalid.
FlagToString will convert a flag to a string, using either it's String() function, or FlagStringer if String() is not defined.
HandleAction attempts to figure out which Action signature was used.
HandleExitCoder handles errors implementing ExitCoder by printing their message and calling OsExiter with the given exit code.
InitAllInputSource is used to to setup an InputSourceContext on a Command Before method.
InitInputSource is used to to setup an InputSourceContext on a Command Before method.
NewApp creates a new cli Application with some reasonable defaults for Name, Usage, Version and Action.
NewContext creates a new context.
NewExitError calls Exit to create a new ExitCoder.
ShowAppHelp is an action that displays the help.
ShowAppHelpAndExit - Prints the list of subcommands for the app and exits with exit code.
ShowCommandCompletions prints the custom completions for a given command.
ShowCommandHelp prints help for the given command.
ShowCommandHelpAndExit - exits with code after showing help.
ShowCompletions prints the lists of commands within a given context.
ShowHelpOnError will take a BeforeFunc and show command usage on error.
ShowSubcommandHelp prints help for the given subcommand.
ShowVersion prints the version number of the App.

# Variables

AppHelpTemplate is the text template for the Default help topic.
BashCompletionFlag enables bash-completion for all commands and subcommands.
CommandHelpTemplate is the text template for the command help topic.
ErrWriter is used to write errors to the user.
No description provided by the author
FlagEnvHinter annotates flag help message with the environment variable details.
FlagFileHinter annotates flag help message with the environment variable details.
FlagNamePrefixer converts a full flag name and its placeholder into the help message flag prefix.
FlagStringer converts a flag definition to a string.
HelpFlag prints the help for all commands and subcommands.
HelpPrinter is a function that writes the help output.
HelpPrinterCustom is a function that writes the help output.
No description provided by the author
OsExiter is the function used when the app exits.
SubcommandHelpTemplate is the text template for the subcommand help topic.
VersionFlag prints the version for the application.
VersionPrinter prints the version for the App.

# Structs

App is the main structure of a cli application.
Author represents someone who has contributed to a cli project.
BoolFlag is a flag with type bool.
BoolSliceFlag is a flag with type []bool.
Command is a subcommand for a cli.App.
Context is a type that is passed through to each Handler action in a cli application.
DurationFlag is a flag with type time.Duration.
DurationSliceFlag is a flag with type []time.Duration.
Float64Flag is a flag with type float64.
Float64SliceFlag is a flag with type []float64.
GenericFlag is a flag with type flag.Value.
Int64Flag is a flag with type int64.
Int64SliceFlag is a flag with type []int64.
IntFlag is a flag with type int.
IntSliceFlag is a flag with type []int.
StringFlag is a flag with type string.
StringSliceFlag is a flag with type []string.
TimeFlag is a flag with type time.Time.
TimeSliceFlag is a flag with type []time.Time.
Uint64Flag is a flag with type uint64.
Uint64SliceFlag is a flag with type []uint64.
UintFlag is a flag with type uint.
UintSliceFlag is a flag with type []uint.

# Interfaces

No description provided by the author
CommandCategories interface allows for category manipulation.
CommandCategory is a category containing commands.
ErrorFormatter is the interface that will suitably format the error output.
ExitCoder is the interface checked by `App` and `Command` for a custom exit code.
Flag is a common interface related to parsing flags in cli.
InputSourceContext is an interface used to allow other input sources to be implemented as needed.
MultiError is an error that wraps multiple errors.

# Type aliases

ActionFunc is the action to execute when no subcommands are specified.
AfterFunc is an action to execute after any subcommands are run, but after the subcommand has finished it is run even if Action() panics.
BashCompleteFunc is an action to execute when the shell completion flag is set.
BeforeFunc is an action to execute before any subcommands are run, but after the context is ready if a non-nil error is returned, no subcommands are run.
Bool is a type alias for bool.
BoolSlice is a type alias for []bool.
CommandNotFoundFunc is executed if the proper command cannot be found.
No description provided by the author
No description provided by the author
Duration is a type alias for time.Duration.
DurationSlice is a type alias for []time.Duration.
ExitErrHandlerFunc is executed if provided in order to handle exitError values returned by Actions and Before/After functions.
FlagEnvHintFunc is used by the default FlagStringFunc to annotate flag help with the environment variable details.
FlagFileHintFunc is used by the default FlagStringFunc to annotate flag help with the file path details.
FlagNamePrefixFunc is used by the default FlagStringFunc to create prefix text for a flag's full name.
FlagsByName is a slice of Flag.
FlagStringFunc is used by the help generation to display a flag, which is expected to be a single line.
Float64 is a type alias for float64.
Float64Slice is a type alias for []float64.
Generic is a type alias for flag.Value.
Int is a type alias for int.
Int64 is a type alias for int64.
Int64Slice is a type alias for []int64.
IntSlice is a type alias for []int.
OnUsageErrorFunc is executed if an usage error occurs.
String is a type alias for string.
StringSlice is a type alias for []string.
Time is a type alias for time.Time.
TimeSlice is a type alias for []time.Time.
Uint is a type alias for uint.
Uint64 is a type alias for uint64.
Uint64Slice is a type alias for []uint64.
UintSlice is a type alias for []uint.