Documentation
¶
Index ¶
- func ExecuteRootCmd(rootCmd *Cmd)
- type ArgOption
- type Cmd
- func (cmd *Cmd) AddChildrenCmd(childrenCmd *Cmd) *Cmd
- func (cmd *Cmd) Arg(name string, auxOptions ...ArgOption) *Cmd
- func (cmd *Cmd) BoolFlag(name string, defaultValue bool, description string, auxOptions ...FlagOption) *Cmd
- func (cmd *Cmd) GuestRunFunc(runFunc guestRunFunc) *Cmd
- func (cmd *Cmd) HelpFlag(description string, auxOptions ...FlagOption) *Cmd
- func (cmd *Cmd) IntFlag(name string, defaultValue int, description string, auxOptions ...FlagOption) *Cmd
- func (cmd *Cmd) LoggedUserRunFunc(runFunc loggedUserRunFunc) *Cmd
- func (cmd *Cmd) Long(long string) *Cmd
- func (cmd *Cmd) ScopeLevel(scopeLevel ScopeLevel) *Cmd
- func (cmd *Cmd) SetHelpTemplate(template string) *Cmd
- func (cmd *Cmd) Short(short string) *Cmd
- func (cmd *Cmd) SilenceError(silenceError bool) *Cmd
- func (cmd *Cmd) SilenceUsage(silenceUsage bool) *Cmd
- func (cmd *Cmd) StringFlag(name string, defaultValue string, description string, auxOptions ...FlagOption) *Cmd
- func (cmd *Cmd) Use(use string) *Cmd
- type CmdParamReader
- type FlagOption
- type GuestCmdData
- type LoggedUserCmdData
- type ParamsReader
- type ScopeLevel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteRootCmd ¶ added in v1.0.5
func ExecuteRootCmd(rootCmd *Cmd)
Types ¶
type ArgOption ¶
type ArgOption = func(cfg *cmdArg)
func OptionalArg ¶
func OptionalArg() ArgOption
func OptionalArgLabel ¶
type Cmd ¶
type Cmd struct {
// contains filtered or unexported fields
}
func (*Cmd) AddChildrenCmd ¶
func (*Cmd) GuestRunFunc ¶
func (*Cmd) LoggedUserRunFunc ¶
func (*Cmd) ScopeLevel ¶
func (cmd *Cmd) ScopeLevel(scopeLevel ScopeLevel) *Cmd
func (*Cmd) SetHelpTemplate ¶ added in v1.0.5
func (*Cmd) SilenceError ¶ added in v1.0.8
func (*Cmd) SilenceUsage ¶
func (*Cmd) StringFlag ¶
type CmdParamReader ¶
type CmdParamReader struct {
// contains filtered or unexported fields
}
func (*CmdParamReader) GetBool ¶
func (r *CmdParamReader) GetBool(name string) bool
func (*CmdParamReader) GetInt ¶
func (r *CmdParamReader) GetInt(name string) int
func (*CmdParamReader) GetString ¶
func (r *CmdParamReader) GetString(name string) string
type FlagOption ¶
type FlagOption = func(cfg *cmdFlag)
func HiddenFlag ¶
func HiddenFlag() FlagOption
func ShortHand ¶
func ShortHand(shorthand string) FlagOption
type GuestCmdData ¶
type LoggedUserCmdData ¶
type ParamsReader ¶
type ScopeLevel ¶
Click to show internal directories.
Click to hide internal directories.