Documentation ¶
Index ¶
- type Application
- func (a *Application) Arg(p1, p2 string) clier.ArgClauser
- func (a *Application) Command(p1, p2 string) clier.CmdClauser
- func (a *Application) Flag(p1, p2 string) clier.FlagClauser
- func (a *Application) IsNil() bool
- func (a *Application) Name() string
- func (a *Application) Parse(args []string) (cmd string, err error)
- func (a *Application) ParseContext(args []string) (p clier.ParseContexter, err error)
- type ArgClause
- func (a *ArgClause) Bool() *bool
- func (a *ArgClause) Default(p1 string) clier.ArgClauser
- func (a *ArgClause) Envar(p1 string) clier.ArgClauser
- func (a *ArgClause) GetArg() *kingpin.ArgClause
- func (a *ArgClause) Required() clier.ArgClauser
- func (a *ArgClause) SetValue(p1 clier.Valuer) clier.ArgClauser
- func (a *ArgClause) String() *string
- func (a *ArgClause) Stringer() string
- type CmdClause
- func (c *CmdClause) Arg(p1, p2 string) clier.ArgClauser
- func (c *CmdClause) Command(p1, p2 string) clier.CmdClauser
- func (c *CmdClause) Flag(p1, p2 string) clier.FlagClauser
- func (c *CmdClause) FullCommand() string
- func (c *CmdClause) GetCmd() *kingpin.CmdClause
- func (c *CmdClause) IsEqualTo(c_ref clier.CmdClauser) bool
- type FlagClause
- func (f *FlagClause) Bool() *bool
- func (f *FlagClause) Default(p1 string) clier.FlagClauser
- func (f *FlagClause) Envar(p1 string) clier.FlagClauser
- func (f *FlagClause) GetFlag() *kingpin.FlagClause
- func (f *FlagClause) Hidden() clier.FlagClauser
- func (f *FlagClause) Required() clier.FlagClauser
- func (f *FlagClause) SetValue(p1 clier.Valuer) clier.FlagClauser
- func (f *FlagClause) Short(p1 rune) clier.FlagClauser
- func (f *FlagClause) String() *string
- func (a *FlagClause) Stringer() string
- type KArgClause
- type KCmdClause
- type KFlagClause
- type ParseContext
- func (p *ParseContext) GetArgValue(a clier.ArgClauser) (interface{}, bool)
- func (p *ParseContext) GetFlagValue(f clier.FlagClauser) (interface{}, bool)
- func (p *ParseContext) GetParam(param_name string) (ret interface{}, err string)
- func (p *ParseContext) IsInvalidContext() bool
- func (p *ParseContext) SelectedCommands() (res []clier.CmdClauser)
- type ParseContextTester
- type ParseContexter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(app *kingpin.Application, name string) *Application
func (*Application) Arg ¶
func (a *Application) Arg(p1, p2 string) clier.ArgClauser
func (*Application) Command ¶
func (a *Application) Command(p1, p2 string) clier.CmdClauser
func (*Application) Flag ¶
func (a *Application) Flag(p1, p2 string) clier.FlagClauser
func (*Application) IsNil ¶
func (a *Application) IsNil() bool
func (*Application) Name ¶
func (a *Application) Name() string
func (*Application) ParseContext ¶
func (a *Application) ParseContext(args []string) (p clier.ParseContexter, err error)
type ArgClause ¶
type ArgClause struct {
// contains filtered or unexported fields
}
func (*ArgClause) Required ¶
func (a *ArgClause) Required() clier.ArgClauser
type CmdClause ¶
type CmdClause struct {
// contains filtered or unexported fields
}
func (*CmdClause) FullCommand ¶
type FlagClause ¶
type FlagClause struct {
// contains filtered or unexported fields
}
func NewFlag ¶
func NewFlag(flag *kingpin.FlagClause) (f *FlagClause)
NewFlag creates a generic FlagClause from kingpin.FlagClause
func (*FlagClause) Bool ¶
func (f *FlagClause) Bool() *bool
func (*FlagClause) Default ¶
func (f *FlagClause) Default(p1 string) clier.FlagClauser
func (*FlagClause) Envar ¶
func (f *FlagClause) Envar(p1 string) clier.FlagClauser
func (*FlagClause) GetFlag ¶
func (f *FlagClause) GetFlag() *kingpin.FlagClause
func (*FlagClause) Hidden ¶
func (f *FlagClause) Hidden() clier.FlagClauser
func (*FlagClause) Required ¶
func (f *FlagClause) Required() clier.FlagClauser
func (*FlagClause) SetValue ¶
func (f *FlagClause) SetValue(p1 clier.Valuer) clier.FlagClauser
func (*FlagClause) Short ¶
func (f *FlagClause) Short(p1 rune) clier.FlagClauser
func (*FlagClause) String ¶
func (f *FlagClause) String() *string
func (*FlagClause) Stringer ¶
func (a *FlagClause) Stringer() string
type KArgClause ¶
type KCmdClause ¶
type KFlagClause ¶
type KFlagClause interface {
GetFlag() *kingpin.FlagClause
}
type ParseContext ¶
type ParseContext struct {
// contains filtered or unexported fields
}
func (*ParseContext) GetArgValue ¶
func (p *ParseContext) GetArgValue(a clier.ArgClauser) (interface{}, bool)
GetArgValue get value from cli, or if missing, ENV or if missing, defaults
func (*ParseContext) GetFlagValue ¶
func (p *ParseContext) GetFlagValue(f clier.FlagClauser) (interface{}, bool)
GetFlagValue get value from cli, or if missing, ENV or if missing, defaults
func (*ParseContext) GetParam ¶
func (p *ParseContext) GetParam(param_name string) (ret interface{}, err string)
func (*ParseContext) IsInvalidContext ¶
func (p *ParseContext) IsInvalidContext() bool
func (*ParseContext) SelectedCommands ¶
func (p *ParseContext) SelectedCommands() (res []clier.CmdClauser)
type ParseContextTester ¶
type ParseContextTester interface {
GetContext() *ParseContext
}
type ParseContexter ¶
type ParseContexter interface {
GetContext() *ParseContext
}
Click to show internal directories.
Click to hide internal directories.