Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute(version string)
Execute adds all child commands to the root command and executes the cmd tree
func NewCmdRoot ¶
NewCmdRoot creates a new root command
Types ¶
type DurationFlag ¶ added in v0.3.0
type DurationFlag struct {
*Flag
}
type Flag ¶ added in v0.3.0
func NewFlag ¶ added in v0.3.0
NewFlag returns a flag builder It serves as a wrapper around cobra and viper, that allows creating and binding typed cli flags to config values
Example:
NewFlag("config", "c").String().Bind(cmd, "config.yaml", "config file")
func (*Flag) Duration ¶ added in v0.3.0
func (f *Flag) Duration() *DurationFlag
func (*Flag) String ¶ added in v0.3.0
func (f *Flag) String() *StringFlag
func (*Flag) StringP ¶ added in v0.3.0
func (f *Flag) StringP(shorthand string) *StringPFlag
type StringFlag ¶ added in v0.3.0
type StringFlag struct {
*Flag
}
type StringPFlag ¶ added in v0.3.0
type StringPFlag struct { *Flag // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.