Documentation ¶
Index ¶
- Constants
- 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) GetArg(p1 ...string) *ArgClause
- func (a *Application) GetCommand(p1 ...string) *CmdClause
- func (a *Application) GetFlag(p1 ...string) *FlagClause
- func (a *Application) IsNil() bool
- func (a *Application) ListOf(p1 ...string) (ret []string)
- func (*Application) Name() string
- func (a *Application) NewContext() *ParseContext
- func (a *Application) Parse(args []string) (string, error)
- func (a *Application) ParseContext(args []string) (clier.ParseContexter, error)
- func (a *Application) String() string
- type ArgClause
- func (a *ArgClause) Bool() (ret *bool)
- func (f *ArgClause) Default(p1 string) clier.ArgClauser
- func (f *ArgClause) Envar(p1 string) clier.ArgClauser
- func (a *ArgClause) GetContextValue() string
- func (a *ArgClause) GetHelp() string
- func (a *ArgClause) GetName() string
- func (a *ArgClause) GetType() string
- func (f *ArgClause) IsBool() bool
- func (f *ArgClause) IsDefault(p1 string) bool
- func (f *ArgClause) IsEnvar(p1 string) bool
- func (f *ArgClause) IsRequired() bool
- func (f *ArgClause) IsSetValue(_ clier.Valuer) bool
- func (f *ArgClause) Required() clier.ArgClauser
- func (a *ArgClause) SetContextValue(s string) (*ArgClause, error)
- func (f *ArgClause) SetValue(v clier.Valuer) clier.ArgClauser
- func (a *ArgClause) String() (ret *string)
- func (a *ArgClause) Stringer() string
- type ClauseList
- 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) IsCommand(p1 string, p2 string) bool
- func (c *CmdClause) IsEqualTo(c_ref clier.CmdClauser) bool
- func (f *CmdClause) IsHelp(help string) bool
- func (f *CmdClause) String() string
- type FlagClause
- func (f *FlagClause) Bool() (ret *bool)
- func (f *FlagClause) Default(p1 string) clier.FlagClauser
- func (f *FlagClause) Envar(p1 string) clier.FlagClauser
- func (f *FlagClause) GetContextValue() string
- func (f *FlagClause) GetHelp() string
- func (f *FlagClause) GetName() string
- func (a *FlagClause) GetType() string
- func (f *FlagClause) Hidden() clier.FlagClauser
- func (f *FlagClause) IsDefault(p1 string) bool
- func (f *FlagClause) IsEnvar(p1 string) bool
- func (f *FlagClause) IsHidden() bool
- func (f *FlagClause) IsRequired() bool
- func (f *FlagClause) IsSetValue(_ clier.Valuer) (ret bool)
- func (f *FlagClause) IsShort(p1 rune) bool
- func (f *FlagClause) Required() clier.FlagClauser
- func (f *FlagClause) SetContextValue(s string) (*FlagClause, error)
- func (f *FlagClause) SetValue(v clier.Valuer) clier.FlagClauser
- func (f *FlagClause) Short(p1 rune) clier.FlagClauser
- func (f *FlagClause) String() (ret *string)
- func (a *FlagClause) Stringer() string
- type ParseContext
- func (p *ParseContext) GetArgValue(a clier.ArgClauser) (interface{}, bool)
- func (p *ParseContext) GetContext() *ParseContext
- func (p *ParseContext) GetFlagValue(f clier.FlagClauser) (interface{}, bool)
- func (p *ParseContext) GetParam(name string) (interface{}, string)
- func (p *ParseContext) IsInvalidContext() bool
- func (p *ParseContext) SelectedCommands() (res []clier.CmdClauser)
- func (p *ParseContext) SetCliValue(name string, value string) (*ParseContext, error)
- func (p *ParseContext) SetContext(p1 ...string) *ParseContext
- func (p *ParseContext) SetContextAppValue(name string, value string) *ParseContext
- func (p *ParseContext) SetContextValue(name string, value string) (*ParseContext, error)
- func (p *ParseContext) SetParsedAppValue(name string, value string) *ParseContext
- func (p *ParseContext) SetValue(name string, value string) (*ParseContext, error)
- func (p *ParseContext) String() (ret string)
- type ParseContextTester
Constants ¶
View Source
const ( NilType = 0 StringType = 1 BoolType = 2 )
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(_ 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) GetArg ¶
func (a *Application) GetArg(p1 ...string) *ArgClause
func (*Application) GetCommand ¶
func (a *Application) GetCommand(p1 ...string) *CmdClause
func (*Application) GetFlag ¶
func (a *Application) GetFlag(p1 ...string) *FlagClause
func (*Application) IsNil ¶
func (a *Application) IsNil() bool
func (*Application) ListOf ¶
func (a *Application) ListOf(p1 ...string) (ret []string)
func (*Application) Name ¶
func (*Application) Name() string
func (*Application) NewContext ¶
func (a *Application) NewContext() *ParseContext
func (*Application) ParseContext ¶
func (a *Application) ParseContext(args []string) (clier.ParseContexter, error)
func (*Application) String ¶
func (a *Application) String() string
type ArgClause ¶
type ArgClause struct {
// contains filtered or unexported fields
}
func (*ArgClause) GetContextValue ¶
func (*ArgClause) IsRequired ¶
func (*ArgClause) Required ¶
func (f *ArgClause) Required() clier.ArgClauser
func (*ArgClause) SetContextValue ¶
type ClauseList ¶
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(name, help string) (f *FlagClause)
func (*FlagClause) Bool ¶
func (f *FlagClause) Bool() (ret *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) GetContextValue ¶
func (f *FlagClause) GetContextValue() string
func (*FlagClause) GetHelp ¶
func (f *FlagClause) GetHelp() string
func (*FlagClause) GetName ¶
func (f *FlagClause) GetName() string
func (*FlagClause) GetType ¶
func (a *FlagClause) GetType() string
func (*FlagClause) Hidden ¶
func (f *FlagClause) Hidden() clier.FlagClauser
func (*FlagClause) IsDefault ¶
func (f *FlagClause) IsDefault(p1 string) bool
func (*FlagClause) IsEnvar ¶
func (f *FlagClause) IsEnvar(p1 string) bool
func (*FlagClause) IsHidden ¶
func (f *FlagClause) IsHidden() bool
func (*FlagClause) IsRequired ¶
func (f *FlagClause) IsRequired() bool
func (*FlagClause) IsSetValue ¶
func (f *FlagClause) IsSetValue(_ clier.Valuer) (ret bool)
func (*FlagClause) IsShort ¶
func (f *FlagClause) IsShort(p1 rune) bool
func (*FlagClause) Required ¶
func (f *FlagClause) Required() clier.FlagClauser
func (*FlagClause) SetContextValue ¶
func (f *FlagClause) SetContextValue(s string) (*FlagClause, error)
func (*FlagClause) SetValue ¶
func (f *FlagClause) SetValue(v clier.Valuer) clier.FlagClauser
func (*FlagClause) Short ¶
func (f *FlagClause) Short(p1 rune) clier.FlagClauser
func (*FlagClause) String ¶
func (f *FlagClause) String() (ret *string)
func (*FlagClause) Stringer ¶
func (a *FlagClause) Stringer() string
type ParseContext ¶
type ParseContext struct { Elements []interface{} // contains filtered or unexported fields }
func (*ParseContext) GetArgValue ¶
func (p *ParseContext) GetArgValue(a clier.ArgClauser) (interface{}, bool)
func (*ParseContext) GetContext ¶
func (p *ParseContext) GetContext() *ParseContext
func (*ParseContext) GetFlagValue ¶
func (p *ParseContext) GetFlagValue(f clier.FlagClauser) (interface{}, bool)
func (*ParseContext) GetParam ¶
func (p *ParseContext) GetParam(name string) (interface{}, string)
func (*ParseContext) IsInvalidContext ¶
func (p *ParseContext) IsInvalidContext() bool
func (*ParseContext) SelectedCommands ¶
func (p *ParseContext) SelectedCommands() (res []clier.CmdClauser)
func (*ParseContext) SetCliValue ¶
func (p *ParseContext) SetCliValue(name string, value string) (*ParseContext, error)
func (*ParseContext) SetContext ¶
func (p *ParseContext) SetContext(p1 ...string) *ParseContext
func (*ParseContext) SetContextAppValue ¶
func (p *ParseContext) SetContextAppValue(name string, value string) *ParseContext
func (*ParseContext) SetContextValue ¶
func (p *ParseContext) SetContextValue(name string, value string) (*ParseContext, error)
func (*ParseContext) SetParsedAppValue ¶
func (p *ParseContext) SetParsedAppValue(name string, value string) *ParseContext
func (*ParseContext) SetValue ¶
func (p *ParseContext) SetValue(name string, value string) (*ParseContext, error)
func (*ParseContext) String ¶
func (p *ParseContext) String() (ret string)
type ParseContextTester ¶
type ParseContextTester interface {
GetContext() *ParseContext
}
Click to show internal directories.
Click to hide internal directories.