Documentation
¶
Index ¶
- type AppContext
- func (ac AppContext) GetBoolFlag(flag string) bool
- func (ac AppContext) GetIntFlag(flag string) int
- func (ac AppContext) GetStringFlag(flag string) string
- func (ac AppContext) GetStringSliceFlag(flag string) []string
- func (ac AppContext) SetBoolFlag(flag string, value bool)
- func (ac AppContext) SetIntFlag(flag string, value int)
- func (ac AppContext) SetStringFlag(flag, value string)
- func (ac AppContext) SetStringSliceFlag(flag string, value []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppContext ¶
type AppContext struct {
Context *cli.Context
Strings map[string]string
Ints map[string]int
Stringslices map[string][]string
Bools map[string]bool
}
AppContext provides app flags
func (AppContext) GetBoolFlag ¶
func (ac AppContext) GetBoolFlag(flag string) bool
GetBoolFlag gets a bool-value for a flag
func (AppContext) GetIntFlag ¶
func (ac AppContext) GetIntFlag(flag string) int
GetIntFlag gets an int-value for a flag
func (AppContext) GetStringFlag ¶
func (ac AppContext) GetStringFlag(flag string) string
GetStringFlag gets the value of a string flag
func (AppContext) GetStringSliceFlag ¶
func (ac AppContext) GetStringSliceFlag(flag string) []string
GetStringSliceFlag gets all values for a slice flag
func (AppContext) SetBoolFlag ¶
func (ac AppContext) SetBoolFlag(flag string, value bool)
SetBoolFlag sets a bool flag
func (AppContext) SetIntFlag ¶
func (ac AppContext) SetIntFlag(flag string, value int)
SetIntFlag sets a int flag
func (AppContext) SetStringFlag ¶
func (ac AppContext) SetStringFlag(flag, value string)
SetStringFlag sets a string flag
func (AppContext) SetStringSliceFlag ¶
func (ac AppContext) SetStringSliceFlag(flag string, value []string)
SetStringSliceFlag sets a stringslice flag
Click to show internal directories.
Click to hide internal directories.