Documentation ¶
Overview ¶
Wraps urfave/cli and provides some ease of use functions allowing method chaining pattern
Index ¶
- func BooleanFlag(name string, usage string, aliases ...string) cli.Flag
- func IntegerFlag(name string, usage string, aliases ...string) cli.Flag
- func StringFlag(name string, usage string, aliases ...string) cli.Flag
- type Args
- type Builder
- func (b *Builder) Before(callback Callback) *Builder
- func (b *Builder) BooleanFlag(name string, usage string, aliases ...string) *Builder
- func (b *Builder) Command(name string, usage string, callback Callback, flags ...cli.Flag) *Builder
- func (b *Builder) Config(config interface{}) *Builder
- func (b *Builder) Daemonize(serviceName string, serviceDescription string) *Builder
- func (b *Builder) DisableMain() *Builder
- func (b *Builder) IntegerFlag(name string, usage string, aliases ...string) *Builder
- func (b *Builder) Run(args ...string) (*Runner, error)
- func (b *Builder) StringFlag(name string, usage string, aliases ...string) *Builder
- func (b *Builder) SubCommand(parent string, name string, usage string, callback Callback, flags ...cli.Flag) *Builder
- type Callback
- type Flags
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BooleanFlag ¶
BooleanFlag specifices a boolean flag variable input by provided name, usage and aliases
func IntegerFlag ¶
IntegerFlag specifices a integer flag variable input by provided name, usage and aliases
func StringFlag ¶
StringFlag specifices a integer flag variable input by provided name, usage and aliases
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Must be created by New(), handles building the cli application
func (*Builder) BooleanFlag ¶
BooleanFlag specifices a boolean flag variable input by provided name, usage and aliases
func (*Builder) DisableMain ¶
Makes application exit after Run() finishes instead of a normal return
func (*Builder) IntegerFlag ¶
IntegerFlag specifices a integer flag variable input by provided name, usage and aliases
func (*Builder) StringFlag ¶
StringFlag specifices a integer flag variable input by provided name, usage and aliases
type Flags ¶
type Flags map[string]interface{}
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Must be created by Run(), handles the running cli application
func (*Runner) Config ¶
func (r *Runner) Config() interface{}
Returns the prased configuration that was set before .Run()