Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdFlag ¶
type CmdFlag struct { Name string Type FlagType DefaultValue interface{} Usage string ConfigKey string }
CmdFlag describes a flag setting
func (CmdFlag) ApplyToCommand ¶
ApplyToCommand adds the flag to a command
func (CmdFlag) KeyString ¶
KeyString returns the Config Key provided or translated from the flag name replacing '-' with '.'
func (CmdFlag) UsageString ¶
UsageString returns the usage string including the environment variable name
type CmdSettings ¶
type CmdSettings struct { UseHint string ShortDescription string LongDescription string Setup func(args []string) Run func(args []string) Flags []CmdFlag }
CmdSettings provides the command settings for the CLI
func (CmdSettings) GetCommand ¶
func (s CmdSettings) GetCommand() *cobra.Command
GetCommand returns a command with the settings
type SimpleApp ¶
type SimpleApp struct {
// contains filtered or unexported fields
}
SimpleApp ṕrovides a single command CLI
func NewSimpleApp ¶
func NewSimpleApp(settings CmdSettings) *SimpleApp
NewSimpleApp returns a new instance of a simple application
Click to show internal directories.
Click to hide internal directories.