Documentation ¶
Index ¶
- Constants
- func ListModules() []string
- func Register(module string, commandFunc func() (Module, ErrorHandling))
- func RegisterFunc(module string, obj interface{}, run func([]string, io.Writer) error, ...)
- func ReparseFlags(module Module)
- func RunModule(key string, module Module, args []string, w io.Writer)
- func VisitModules(f func(string, Module))
- type ErrorHandling
- type Module
Constants ¶
View Source
const ( ContinueOnError = ErrorHandling(flag.ContinueOnError) PanicOnError = ErrorHandling(flag.PanicOnError) ExitOnError = ErrorHandling(flag.ExitOnError) )
Variables ¶
This section is empty.
Functions ¶
func ListModules ¶
func ListModules() []string
func Register ¶
func Register(module string, commandFunc func() (Module, ErrorHandling))
func RegisterFunc ¶
func ReparseFlags ¶
func ReparseFlags(module Module)
Re-apply the flag settings to the module that was bound earlier. This is done by matching the type of the module and use the bound flagSet and reparse it again.
func VisitModules ¶
Types ¶
type ErrorHandling ¶
type ErrorHandling flag.ErrorHandling
Click to show internal directories.
Click to hide internal directories.